Package: bash-completion Version: 1:1.99-3 Severity: minor Tags: patch upstream
Dear Maintainer, 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. Please see attached patch which corrects the problem. Cheers, Itaï. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (600, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages bash-completion depends on: ii bash 4.2-1 bash-completion recommends no packages. bash-completion suggests no packages. -- debconf-show failed
Description: <short summary of the patch> TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . bash-completion (1:1.99-3.1) unstable; urgency=low . * Non-maintainer upload. * Follow symlinks on scp completion. Author: Itaï BEN YAACOV <can...@free.fr> --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: <vendor|upstream|other>, <url of original patch> Bug: <url in upstream bugtracker> Bug-Debian: http://bugs.debian.org/<bugnumber> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> Forwarded: <no|not-needed|url proving that it has been forwarded> Reviewed-By: <name and email of someone who approved the patch> Last-Update: <YYYY-MM-DD> --- bash-completion-1.99.orig/completions/ssh +++ bash-completion-1.99/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