Be compatible with shells of Ubuntu 14.04

This commit is contained in:
Tom "Ravi" Hale
2018-09-16 20:31:15 +07:00
parent e5da83665a
commit 48302bcd8c
6 changed files with 39 additions and 24 deletions

View File

@@ -21,7 +21,8 @@ _alias() {
# Quote the contents of "$@"
function token_quote {
# Older versions of {ba,z}sh don't support the built-in quoting, so fall back to printf %q
local quoted=()
local quoted
quoted=() # Assign separately for zsh 5.0.2 of Ubuntu 14.04
for token; do
quoted+=( "$(printf '%q' "$token")" )
done