diff --git a/src/global.h b/src/global.h index 67e4141..9ba22ba 100644 --- a/src/global.h +++ b/src/global.h @@ -103,5 +103,6 @@ int input_handle(int); #include "help.h" #include "path.h" #include "util.h" +#include "shell.h" #endif diff --git a/src/help.c b/src/help.c index 074d9ed..8c130d7 100644 --- a/src/help.c +++ b/src/help.c @@ -32,7 +32,7 @@ int page, start; -#define KEYS 16 +#define KEYS 17 char *keys[KEYS*2] = { /*|----key----| |----------------description----------------|*/ "up, k", "Move cursor up", diff --git a/src/shell.c b/src/shell.c index ae3cc22..d601b5a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -34,7 +34,7 @@ #include void shell_draw() { - char *full_path, *shell; + char *full_path; int res; /* suspend ncurses mode */ @@ -60,7 +60,7 @@ void shell_draw() { /* resume ncurses mode */ reset_prog_mode(); - if (res == -1 || WEXITSTATUS(res) != 0) { + if (res == -1 || !WIFEXITED(res) || WEXITSTATUS(res) == 127) { clear(); printw("ERROR: Can't execute shell interpreter: %s\n" "\n"