diff --git a/bash_completion b/bash_completion index 14da9bb6..5fee08bf 100644 --- a/bash_completion +++ b/bash_completion @@ -2,7 +2,7 @@ # # # @@ -974,6 +974,9 @@ _known_hosts() COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} cur=${cur#*@} + # Escape slashes and dots in paths for awk + cur=${cur//\//\\\/} + cur=${cur//\./\\\.} kh=() [ -r /etc/known_hosts ] && kh[0]=/etc/known_hosts @@ -1186,7 +1189,7 @@ _service() else COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \ s/^.*Usage.*{\(.*\)}.*$/\1/p" \ - $sysvdir/${COMP_WORDS[1]}' $cur ) ) + $sysvdir/${COMP_WORDS[1]}`' $cur ) ) fi return 0