Use $SHELL instead of hardcoding /bin/sh in ratpoison. Patch by Mark H Weaver . --- ratpoison/src/actions.c.orig 2014-09-14 16:46:08.000000000 +0200 +++ ratpoison/src/actions.c 2015-08-06 15:00:54.951575260 +0200 @@ -228,12 +228,12 @@ add_command ("escape", cmd_escape, 1, 1, 1, "Key: ", arg_KEY); add_command ("exec", cmd_exec, 1, 1, 1, - "/bin/sh -c ", arg_SHELLCMD); + "$SHELL -c ", arg_SHELLCMD); add_command ("execa", cmd_execa, 1, 1, 1, - "/bin/sh -c ", arg_SHELLCMD); + "$SHELL -c ", arg_SHELLCMD); add_command ("execf", cmd_execf, 2, 2, 2, "frame to execute in:", arg_FRAME, - "/bin/sh -c ", arg_SHELLCMD); + "$SHELL -c ", arg_SHELLCMD); add_command ("fdump", cmd_fdump, 1, 0, 0, "", arg_NUMBER); add_command ("focus", cmd_next_frame, 0, 0, 0); @@ -367,7 +367,7 @@ add_command ("unsetenv", cmd_unsetenv, 1, 1, 1, "Variable: ", arg_STRING); add_command ("verbexec", cmd_verbexec, 1, 1, 1, - "/bin/sh -c ", arg_SHELLCMD); + "$SHELL -c ", arg_SHELLCMD); add_command ("version", cmd_version, 0, 0, 0); add_command ("vsplit", cmd_v_split, 1, 0, 0, "Split: ", arg_STRING); @@ -2671,6 +2671,9 @@ pid = fork(); if (pid == 0) { + char *shell_path; + char *shell_name; + /* Some process setup to make sure the spawned process runs in its own session. */ putenv(current_screen()->display_string); @@ -2700,7 +2703,18 @@ /* raw means don't run it through sh. */ if (raw) execl (cmd, cmd, (char *)NULL); - execl("/bin/sh", "sh", "-c", cmd, (char *)NULL); + + shell_path = getenv ("SHELL"); + if (shell_path == NULL) + shell_path = "/bin/sh"; + + shell_name = strrchr (shell_path, '/'); + if (shell_name == NULL) + shell_name = shell_path; + else + shell_name++; + + execl(shell_path, shell_name, "-c", cmd, (char *)NULL); _exit(EXIT_FAILURE); } --- ratpoison/src/events.c.orig 2014-09-14 16:46:23.000000000 +0200 +++ ratpoison/src/events.c 2015-08-06 15:02:17.287578780 +0200 @@ -919,7 +919,7 @@ { /* Report any child that didn't return 0. */ if (cur->status != 0) - marked_message_printf (0,0, "/bin/sh -c \"%s\" finished (%d)", + marked_message_printf (0,0, "$SHELL -c \"%s\" finished (%d)", cur->cmd, cur->status); list_del (&cur->node); free (cur->cmd); --- ratpoison/src/messages.h.orig 2014-04-09 01:22:08.000000000 +0200 +++ ratpoison/src/messages.h 2015-08-06 15:04:14.759583801 +0200 @@ -39,7 +39,7 @@ #define MESSAGE_PROMPT_SWITCH_TO_WINDOW "Switch to window: " #define MESSAGE_PROMPT_NEW_WINDOW_NAME "Set window's title to: " -#define MESSAGE_PROMPT_SHELL_COMMAND "/bin/sh -c " +#define MESSAGE_PROMPT_SHELL_COMMAND "$SHELL -c " #define MESSAGE_PROMPT_COMMAND ":" #define MESSAGE_PROMPT_SWITCH_WM "Switch to wm: " #define MESSAGE_PROMPT_XTERM_COMMAND MESSAGE_PROMPT_SHELL_COMMAND TERM_PROG " -e " rties, tagged-object]: New procedures. Use them. (package-transformations, manifest-entry-with-transformations): New procedures. * guix/scripts/pack.scm (guix-pack)[with-transformations]: New procedure. Use it. * guix/scripts/package.scm (process-actions)[transform-entry]: Use it. * tests/guix-package-aliases.sh: Add test. Ludovic Courtès 2020-09-28tests: Simplify shell exit status negation;...* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh: Use the shell '!' keyword to negate command exit status in place of 'if ...; then false; else true; fi' Eric Bavier 2020-05-11tests: Test 'guix show' with multiple packages....* tests/guix-package-aliases.sh: Test 'guix show' with multiple packages. Ludovic Courtès 2019-09-21guix package: '--show' ignores deprecated packages....* guix/scripts/package.scm (process-query) <'show>: Remove superseded packages. * tests/guix-package-aliases.sh: Add test. Ludovic Courtès 2019-09-21guix package: Add 'guix show' alias....* guix/scripts/show.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add it. * tests/guix-package-aliases.sh: Add test. * doc/guix.texi (Invoking guix package): Document it and use it in a example. Signed-off-by: Ludovic Courtès <ludo@gnu.org> zimoun 2019-04-29guix package: Add 'guix search' alias....* guix/scripts/search.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add it. * tests/guix-package-aliases.sh: Add test. * doc/guix.texi (Invoking guix package): Document it and use it in a couple of examples. Ludovic Courtès 2019-04-29guix package: Add 'install', 'remove', and 'upgrade' aliases....* guix/scripts/install.scm, guix/scripts/remove.scm, guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files. * Makefile.am (MODULES, SH_TESTS): Add them. * po/guix/POTFILES.in: Add them. * guix/scripts/package.scm (guix-package): Split with... (guix-package*): ... this. New procedure. * doc/guix.texi (Invoking guix package): Document them. (Binary Installation, Application Setup, Package Management) (Packages with Multiple Outputs, Package Modules) (X.509 Certificates, Installing Debugging Files): Use 'guix install' in simple examples. * etc/completion/bash/guix (_guix_complete): Handle "install", "remove", and "upgrade". Ludovic Courtès