From bf4937bc910db2944dc50edd67bbd545e76821e2 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Sun, 19 Jun 2016 23:36:39 -0700 Subject: Return exit code from run --- src/fzy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/fzy.c') diff --git a/src/fzy.c b/src/fzy.c index 654bd40..3b47475 100644 --- a/src/fzy.c +++ b/src/fzy.c @@ -13,6 +13,8 @@ #include "../config.h" int main(int argc, char *argv[]) { + int ret = 0; + options_t options; options_parse(&options, argc, argv); @@ -47,10 +49,10 @@ int main(int argc, char *argv[]) { tty_interface_t tty_interface; tty_interface_init(&tty_interface, &tty, &choices, &options); - tty_interface_run(&tty_interface); + ret = tty_interface_run(&tty_interface); } choices_destroy(&choices); - return 0; + return ret; } -- cgit v1.2.3