Automatically add backslashes to arguments when needed

Former-commit-id: 7a31d3cebdb03af4c2067437d4a983293fce36ba [formerly 2fba1262a1]
Former-commit-id: 568c22399a1bea5a63bbde22f6710b287127acda
This commit is contained in:
2023-02-20 17:56:25 -05:00
parent 25121f3a5c
commit 9928a43d6a
+1 -1
View File
@@ -35,7 +35,7 @@ _sshyp_completions() {
elif [[ "$compline" == '/'* ]]; then
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "add gen edit copy shear" -- "$cur" )
else
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "help version tweak add gen edit copy shear sync $(printf "'%s' " "${trimmed_paths[@]}")" -- "$cur" )
while read -r; do ITEM=${REPLY// /\\ }; COMPREPLY+=( "$ITEM" ); done < <( compgen -W "help version tweak add gen edit copy shear sync $(printf "'%s' " "${trimmed_paths[@]}")" -- "$cur" )
fi
} &&