Fixes to completions for filenames containing tabs (RedHat: #629518).
parent
35ac650e30
commit
3d8efed618
1
CHANGES
1
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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ _bzip2()
|
|||
return 0
|
||||
fi
|
||||
|
||||
local IFS=$'\t\n'
|
||||
local IFS=$'\n'
|
||||
|
||||
xspec="*.bz2"
|
||||
if [[ "$prev" == --* ]]; then
|
||||
|
|
|
@ -21,7 +21,7 @@ _gzip()
|
|||
return 0
|
||||
fi
|
||||
|
||||
local IFS=$'\t\n'
|
||||
local IFS=$'\n'
|
||||
|
||||
xspec="*.@(gz|t[ag]z)"
|
||||
if [[ "$prev" == --* ]]; then
|
||||
|
|
|
@ -48,7 +48,7 @@ _lrzip()
|
|||
|
||||
_expand || return 0
|
||||
|
||||
local IFS=$'\t\n'
|
||||
local IFS=$'\n'
|
||||
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
|
||||
$( compgen -d -- "$cur" ) )
|
||||
} &&
|
||||
|
|
|
@ -16,7 +16,7 @@ _lzma()
|
|||
return 0
|
||||
fi
|
||||
|
||||
local IFS=$'\t\n'
|
||||
local IFS=$'\n'
|
||||
|
||||
xspec="*.@(lzma|tlz)"
|
||||
if [[ "$prev" == --* ]]; then
|
||||
|
|
|
@ -53,7 +53,7 @@ _lzop()
|
|||
|
||||
_expand || return 0
|
||||
|
||||
local IFS=$'\t\n'
|
||||
local IFS=$'\n'
|
||||
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
|
||||
$( compgen -d -- "$cur" ) )
|
||||
} &&
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -52,7 +52,7 @@ _xz()
|
|||
|
||||
_expand || return 0
|
||||
|
||||
local IFS=$'\t\n'
|
||||
local IFS=$'\n'
|
||||
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
|
||||
$( compgen -d -- "$cur" ) )
|
||||
} &&
|
||||
|
|
Loading…
Reference in New Issue