diff --git a/bash_completion b/bash_completion index 7898f556..547821a4 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05b # -# $Id: bash_completion,v 1.793 2005/07/07 22:07:00 ianmacd Exp $ +# $Id: bash_completion,v 1.794 2005/07/07 22:11:38 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -2507,17 +2507,17 @@ _scp() # escape spaces; remove executables, aliases, pipes and sockets; # add space at end of file names COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \ - command ls -aF1d "$path*" 2>/dev/null | \ - sed -e 's/ /\\\\\\\ /g' -e 's/[*@|=]$//g' \ - -e 's/[^\/]$/& /g' \ - -e 's/\([&()<>;|]\)/\\&/g' ) ) + command ls -aF1d "$path*" 2>/dev/null | \ + sed -e 's/[][(){}<>",:;^&!$&=?`|\ ]/\\\\\\&/g' \ + -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) ) return 0 fi [[ "$cur" == */* ]] || _known_hosts -c -a COMPREPLY=( ${COMPREPLY[@]} $( command ls -aF1d $cur* \ - 2>/dev/null | sed -e 's/ /\\ /g' -e 's/[*@|=]$//g'\ - -e 's/[^\/]$/& /g' -e 's/\([&()<>;|]\)/\\&/g' ) ) + 2>/dev/null | sed \ + -e 's/[][(){}<>",:;^&!$&=?`|\ ]/\\&/g' \ + -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) ) return 0 } complete -F _scp $nospace scp