Show arg to EDITOR, PAGER & SHELL

This commit is contained in:
Arun Prakash Jana 2018-12-01 08:12:34 +05:30
parent 4b9796eae0
commit 50a4449417
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -2116,15 +2116,15 @@ static int show_help(char *path)
if (getenv("PWD")) if (getenv("PWD"))
dprintf(fd, "PWD: %s\n", getenv("PWD")); dprintf(fd, "PWD: %s\n", getenv("PWD"));
if (getenv("SHELL")) if (getenv("SHELL"))
dprintf(fd, "SHELL: %s\n", shell); dprintf(fd, "SHELL: %s %s\n", shell, shell_arg);
if (getenv("SHLVL")) if (getenv("SHLVL"))
dprintf(fd, "SHLVL: %s\n", getenv("SHLVL")); dprintf(fd, "SHLVL: %s\n", getenv("SHLVL"));
if (getenv("VISUAL")) if (getenv("VISUAL"))
dprintf(fd, "VISUAL: %s\n", editor); dprintf(fd, "VISUAL: %s %s\n", editor, editor_arg);
else if (getenv("EDITOR")) else if (getenv("EDITOR"))
dprintf(fd, "EDITOR: %s\n", editor); dprintf(fd, "EDITOR: %s %s\n", editor, editor_arg);
if (getenv("PAGER")) if (getenv("PAGER"))
dprintf(fd, "PAGER: %s\n", pager); dprintf(fd, "PAGER: %s %s\n", pager, pager_arg);
dprintf(fd, "\nVersion: %s\n%s\n", VERSION, GENERAL_INFO); dprintf(fd, "\nVersion: %s\n%s\n", VERSION, GENERAL_INFO);
close(fd); close(fd);