From 6e28eb645a7d0bafdc604ccf81db7af3ca3f7cfd Mon Sep 17 00:00:00 2001 From: Patrick Brinich-Langlois Date: Sun, 23 Aug 2015 21:51:27 -0700 Subject: [PATCH] exec_scmb_expand_args: Escape ampersands. --- lib/git/status_shortcuts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/status_shortcuts.sh b/lib/git/status_shortcuts.sh index f77f066..c0fb549 100644 --- a/lib/git/status_shortcuts.sh +++ b/lib/git/status_shortcuts.sh @@ -158,7 +158,7 @@ _print_path() { # Execute a command with expanded args, e.g. Delete files 6 to 12: $ ge rm 6-12 # Fails if command is a number or range (probably not worth fixing) exec_scmb_expand_args() { - eval "$(scmb_expand_args "$@" | sed -e "s/\([][|;()<>^ \"']\)/"'\\\1/g')" + eval "$(scmb_expand_args "$@" | sed -e "s/\([][|;()<>^ \"'&]\)/"'\\\1/g')" } # Clear numbered env variables