Further ll fixes for escaped spaces and quotes!
This commit is contained in:
@@ -154,13 +154,11 @@ EOF
|
||||
else
|
||||
ll_files="$(\ls "$@")"
|
||||
fi
|
||||
# Escape single and double quotes
|
||||
ll_files=$(echo "$ll_files" | \sed -e 's/"/\\\\\\"/g' -e "s/'"'/\\\\'"'/g")
|
||||
|
||||
OLDIFS="$IFS"; IFS=$'\n'
|
||||
for file in $ll_files; do
|
||||
if [ -n "$rel_path" ]; then file="$rel_path/$file"; fi
|
||||
export $git_env_char$e="$(eval $_abs_path_command \"$file\")"
|
||||
export $git_env_char$e="$(eval $_abs_path_command \"${file//\"/\\\"}\")"
|
||||
if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi
|
||||
let e++
|
||||
done
|
||||
|
||||
@@ -138,7 +138,7 @@ scmb_expand_args() {
|
||||
|
||||
# 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')"; }
|
||||
exec_scmb_expand_args() { eval "$(scmb_expand_args "$@" | sed -e "s/\([][()<>^ \"']\)/"'\\\1/g')"; }
|
||||
|
||||
# Clear numbered env variables
|
||||
git_clear_vars() {
|
||||
|
||||
Reference in New Issue
Block a user