From eb1c298f8f5e07822cba986166ad0168c33cf42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 23 Jan 2009 01:12:32 +0200 Subject: [PATCH] scp metachar escaping fixes: remove duplicate '&' (always there), escape '!' (broken in r1082) --- contrib/ssh | 4 ++-- debian/changelog | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/ssh b/contrib/ssh index 6d354b6e..cc6202ad 100644 --- a/contrib/ssh +++ b/contrib/ssh @@ -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 } diff --git a/debian/changelog b/debian/changelog index b13b7f87..b49d5df2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 17 Jan 2009 19:01:16 +0100