[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-177-g89acac9
Ville Skyttä
ville.skytta at iki.fi
Fri Jun 15 16:20:37 UTC 2012
The following commit has been merged in the master branch:
commit 89acac9910a27cc9428314e66c3bdbfc48c65f41
Author: Itaï BEN YAACOV <candeb at free.fr>
Date: Fri Jun 15 19:16:14 2012 +0300
scp: Recognise symlinks to directories as directories (Debian: #666055).
When auto-completing an scp command, slashes are added after (local
or remote) directories, and spaces after files AND after symlinks to
directories. Expected behaviour would be slashes after directories
or symlinks to such.
diff --git a/completions/ssh b/completions/ssh
index a18ba49..5cd03b9 100644
--- a/completions/ssh
+++ b/completions/ssh
@@ -266,13 +266,13 @@ _scp_remote_files()
if [[ $1 == -d ]]; then
# escape problematic characters; remove non-dirs
files=$( ssh -o 'Batchmode yes' $userhost \
- command ls -aF1d "$path*" 2>/dev/null | \
+ command ls -aF1dL "$path*" 2>/dev/null | \
sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e '/[^\/]$/d' )
else
# escape problematic characters; remove executables, aliases, pipes
# and sockets; add space at end of file names
files=$( ssh -o 'Batchmode yes' $userhost \
- command ls -aF1d "$path*" 2>/dev/null | \
+ command ls -aF1dL "$path*" 2>/dev/null | \
sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e 's/[*@|=]$//g' \
-e 's/[^\/]$/& /g' )
fi
@@ -294,10 +294,10 @@ _scp_local_files()
fi
if $dirsonly ; then
- COMPREPLY+=( $( command ls -aF1d $cur* 2>/dev/null | \
+ COMPREPLY+=( $( command ls -aF1dL $cur* 2>/dev/null | \
sed -e "s/$_scp_path_esc/\\\\&/g" -e '/[^\/]$/d' -e "s/^/$1/") )
else
- COMPREPLY+=( $( command ls -aF1d $cur* 2>/dev/null | \
+ COMPREPLY+=( $( command ls -aF1dL $cur* 2>/dev/null | \
sed -e "s/$_scp_path_esc/\\\\&/g" -e 's/[*@|=]$//g' \
-e 's/[^\/]$/& /g' -e "s/^/$1/") )
fi
--
bash-completion
More information about the Bash-completion-commits
mailing list