[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 3d8efed6182454fd0913522406a10d1bf8a3d19f

Ville Skyttä ville.skytta at iki.fi
Mon Oct 4 17:49:26 UTC 2010


The following commit has been merged in the master branch:
commit 3d8efed6182454fd0913522406a10d1bf8a3d19f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Oct 4 20:49:17 2010 +0300

    Fixes to completions for filenames containing tabs (RedHat: #629518).

diff --git a/CHANGES b/CHANGES
index 962deda..dd9574b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,7 @@ bash-completion (2.x)
   * Fix known hosts completion for IPv6 addresses whose last 16 bits are digits
     (Alioth: #312695, RedHat: #630658).
   * Improve mplayer and mencoder completions.
+  * Fixes to completions for filenames containing tabs (RedHat: #629518).
 
   [ Freddy Vulto ]
   * Added _tilde(), fix ~username completion (Alioth: #312613, Debian: #587095)
diff --git a/bash_completion b/bash_completion
index 9e16b9b..e3ae308 100644
--- a/bash_completion
+++ b/bash_completion
@@ -615,7 +615,7 @@ _quote_readline_by_ref()
 #
 _filedir()
 {
-    local i IFS=$'\t\n' xspec
+    local i IFS=$'\n' xspec
 
     _tilde "$cur" || return 0
 
@@ -1361,7 +1361,7 @@ complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 ping \
 #
 _cd()
 {
-    local cur IFS=$'\t\n' i j k
+    local cur IFS=$'\n' i j k
     _get_comp_words_by_ref cur
 
     # try to allow variable completion
@@ -1384,7 +1384,7 @@ _cd()
     local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)
 
     # we have a CDPATH, so loop on its contents
-    for i in ${CDPATH//:/$'\t'}; do
+    for i in ${CDPATH//:/$'\n'}; do
         # create an array of matched subdirs
         k="${#COMPREPLY[@]}"
         for j in $( compgen -d $i/$cur ); do
@@ -1564,7 +1564,7 @@ _filedir_xspec()
 {
     local IFS cur xspec
 
-    IFS=$'\t\n'
+    IFS=$'\n'
     COMPREPLY=()
     _get_comp_words_by_ref cur
 
diff --git a/completions/bzip2 b/completions/bzip2
index f4902e2..be03027 100644
--- a/completions/bzip2
+++ b/completions/bzip2
@@ -21,7 +21,7 @@ _bzip2()
         return 0
     fi
 
-    local IFS=$'\t\n'
+    local IFS=$'\n'
 
     xspec="*.bz2"
     if [[ "$prev" == --* ]]; then
diff --git a/completions/gzip b/completions/gzip
index 0951f72..afd647e 100644
--- a/completions/gzip
+++ b/completions/gzip
@@ -21,7 +21,7 @@ _gzip()
         return 0
     fi
 
-    local IFS=$'\t\n'
+    local IFS=$'\n'
 
     xspec="*.@(gz|t[ag]z)"
     if [[ "$prev" == --* ]]; then
diff --git a/completions/lrzip b/completions/lrzip
index e584803..445fc3c 100644
--- a/completions/lrzip
+++ b/completions/lrzip
@@ -48,7 +48,7 @@ _lrzip()
 
     _expand || return 0
 
-    local IFS=$'\t\n'
+    local IFS=$'\n'
     COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
         $( compgen -d -- "$cur" ) )
 } &&
diff --git a/completions/lzma b/completions/lzma
index a176f19..c2fece9 100644
--- a/completions/lzma
+++ b/completions/lzma
@@ -16,7 +16,7 @@ _lzma()
         return 0
     fi
 
-    local IFS=$'\t\n'
+    local IFS=$'\n'
 
     xspec="*.@(lzma|tlz)"
     if [[ "$prev" == --* ]]; then
diff --git a/completions/lzop b/completions/lzop
index 19852b2..7a34ae3 100644
--- a/completions/lzop
+++ b/completions/lzop
@@ -53,7 +53,7 @@ _lzop()
 
     _expand || return 0
 
-    local IFS=$'\t\n'
+    local IFS=$'\n'
     COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
             $( compgen -d -- "$cur" ) )
 } &&
diff --git a/completions/mplayer b/completions/mplayer
index 5d1b87c..39ac93d 100644
--- a/completions/mplayer
+++ b/completions/mplayer
@@ -48,7 +48,7 @@ _mplayer()
             ;;
         -vobsub)
             _filedir '@(idx|ifo|sub)'
-            local IFS=$'\t\n'
+            local IFS=$'\n'
             COMPREPLY=( $( for i in "${COMPREPLY[@]}"; do
                         if [[ -f $i && -r $i ]]; then
                             printf '%s\n' ${i%.*}
@@ -76,7 +76,7 @@ _mplayer()
                 dirs=(/usr/share/mplayer/skins /usr/local/share/mplayer/skins)
             fi
 
-            local IFS=$'\t\n'
+            local IFS=$'\n'
             for i in ~/.mplayer/skins ${dirs[@]}; do
                 if [[ -d $i && -r $i ]]; then
                     for j in $( compgen -d $i/$cur ); do
diff --git a/completions/perl b/completions/perl
index ea71b2f..9a1d84b 100644
--- a/completions/perl
+++ b/completions/perl
@@ -30,7 +30,7 @@ _perl()
     # only handle module completion for now
     case $prev in
         -I|-x)
-            local IFS=$'\t\n'
+            local IFS=$'\n'
             COMPREPLY=( $( compgen -d $optPrefix $optSuffix -- "$cur" ) )
             return 0
             ;;
diff --git a/completions/ssh b/completions/ssh
index b4bafde..2c20c2d 100644
--- a/completions/ssh
+++ b/completions/ssh
@@ -246,13 +246,13 @@ _sftp()
 shopt -u hostcomplete && complete -F _sftp sftp
 
 # things we want to escape in remote scp paths
-_scp_path_esc="[][(){}<>\",:;^&\!$=?\`|\\ ']"
+_scp_path_esc="[][(){}<>\",:;^&\!$=?\`|\\ \t']"
 
 # Complete remote files with ssh.  If the first arg is -d, complete on dirs
 # only.  Returns paths escaped with three backslashes.
 _scp_remote_files()
 {
-    local IFS=$'\t\n'
+    local IFS=$'\n'
 
     # remove backslash escape from the first colon
     cur=${cur/\\:/:}
@@ -291,7 +291,7 @@ _scp_remote_files()
 # an optional prefix to add to returned completions.
 _scp_local_files()
 {
-    local IFS=$'\t\n'
+    local IFS=$'\n'
 
     local dirsonly=false
     if [ "$1" = -d ]; then
diff --git a/completions/wvdial b/completions/wvdial
index 101112c..3b135f0 100644
--- a/completions/wvdial
+++ b/completions/wvdial
@@ -3,7 +3,7 @@
 have wvdial &&
 _wvdial()
 {
-    local cur prev config i IFS=$'\t\n'
+    local cur prev config i IFS=$'\n'
 
     COMPREPLY=()
     _get_comp_words_by_ref cur prev
@@ -23,7 +23,7 @@ _wvdial()
             ;;
         *)
             # start with global and personal config files
-            config="/etc/wvdial.conf"$'\t'"$HOME/.wvdialrc"
+            config="/etc/wvdial.conf"$'\n'"$HOME/.wvdialrc"
             # replace with command line config file if present
             for (( i=1; i < COMP_CWORD; i++ )); do
                 if [[ "${COMP_WORDS[i]}" == "--config" ]]; then
diff --git a/completions/xz b/completions/xz
index 46420b0..f947b08 100644
--- a/completions/xz
+++ b/completions/xz
@@ -52,7 +52,7 @@ _xz()
 
     _expand || return 0
 
-    local IFS=$'\t\n'
+    local IFS=$'\n'
     COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
         $( compgen -d -- "$cur" ) )
 } &&

-- 
bash-completion



More information about the Bash-completion-commits mailing list