aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/_ssh_config_hosts.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bash_completion.d/_ssh_config_hosts.bash')
-rw-r--r--bash/bash_completion.d/_ssh_config_hosts.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bash_completion.d/_ssh_config_hosts.bash b/bash/bash_completion.d/_ssh_config_hosts.bash
index dc75d4bc..0c1eb379 100644
--- a/bash/bash_completion.d/_ssh_config_hosts.bash
+++ b/bash/bash_completion.d/_ssh_config_hosts.bash
@@ -2,7 +2,7 @@
_ssh_config_hosts() {
# Don't complete anything that wouldn't be in a valid hostname
- case ${COMP_WORDS[COMP_CWORD]} in
+ case $2 in
*[!a-zA-Z0-9.-]*) return 1 ;;
esac
@@ -37,7 +37,7 @@ _ssh_config_hosts() {
(*'*'*) ;;
# Found a match; print it
- ("${COMP_WORDS[COMP_CWORD]}"*)
+ ("$2"*)
printf '%s\n' "$value"
;;
esac