scp metachar escaping fixes: remove duplicate '&' (always there), escape '!' (broken in r1082)

This commit is contained in:
Ville Skyttä 2009-01-23 01:12:32 +02:00
parent a5370735f9
commit eb1c298f8f
2 changed files with 3 additions and 2 deletions

View File

@ -82,7 +82,7 @@ _scp()
# add space at end of file names
COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \
command ls -aF1d "$path*" 2>/dev/null | \
sed -e "s/[][(){}<>\",:;^&!$&=?\`|\\ ']/\\\\\\\\\\\\&/g" \
sed -e "s/[][(){}<>\",:;^&\!$=?\`|\\ ']/\\\\\\\\\\\\&/g" \
-e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
return 0
fi
@ -106,7 +106,7 @@ _scp()
local IFS=$'\t\n'
COMPREPLY=( "${COMPREPLY[@]}" $( command ls -aF1d $cur* \
2>/dev/null | sed \
-e "s/[][(){}<>\",:;^&!$&=?\`|\\ ']/\\\\&/g" \
-e "s/[][(){}<>\",:;^&\!$=?\`|\\ ']/\\\\&/g" \
-e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
return 0
}

1
debian/changelog vendored
View File

@ -99,6 +99,7 @@ bash-completion (200811xx) UNRELEASED; urgency=low
* Add .mp2 and .vdr to mplayer completion (RHBZ: #444467).
* Add .mkv, .mp2 and .vdr to *xine completion (RHBZ: #444467).
* Added lzop completion.
* Fix scp metacharacter escaping.
-- David Paleino <d.paleino@gmail.com> Sat, 17 Jan 2009 19:01:16 +0100