exec_scmb_expand_args: Escape ampersands.

This commit is contained in:
Patrick Brinich-Langlois
2015-08-23 21:51:27 -07:00
parent 53aba36670
commit 6e28eb645a

View File

@@ -158,7 +158,7 @@ _print_path() {
# Execute a command with expanded args, e.g. Delete files 6 to 12: $ ge rm 6-12 # 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) # Fails if command is a number or range (probably not worth fixing)
exec_scmb_expand_args() { 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 # Clear numbered env variables