From 2fba1262a124f7fea90b7a4a58cdb2cd45483eab Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 20 Feb 2023 17:56:25 -0500 Subject: [PATCH] Automatically add backslashes to arguments when needed --- extra/sshyp-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/sshyp-completion.bash b/extra/sshyp-completion.bash index 904760e..bc66be1 100755 --- a/extra/sshyp-completion.bash +++ b/extra/sshyp-completion.bash @@ -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 } &&