tar: Don't take -I to mean bzip2.
It hasn't meant bzip2 since GNU tar 1.13.18 (2000) and means something different since 1.22 (2009).
This commit is contained in:
parent
8e63eafb83
commit
f321357991
@ -33,7 +33,7 @@ _tar()
|
||||
fi
|
||||
return 0
|
||||
;;
|
||||
+([^IZzJjy])f)
|
||||
+([^ZzJjy])f)
|
||||
ext="$tars"
|
||||
regex='\(\(tar\|gem\|spkg\)\(\.\(Z\|[gx]z\|bz2\?\|lzma\)\)\?\|t\([glx]z\|bz2\?\)\)'
|
||||
;;
|
||||
@ -41,7 +41,7 @@ _tar()
|
||||
ext='@(t?(ar.)|gem.|spkg.)@(gz|Z)'
|
||||
regex='\(t\(ar\.\)\?\|gem\.\|spkg\.\)\(gz\|Z\)'
|
||||
;;
|
||||
*[Ijy]*f)
|
||||
*[jy]*f)
|
||||
ext='@(@(t?(ar.)|gem.)bz?(2)|spkg)'
|
||||
regex='\(\(t\(ar\.\)\?\|gem\.\)bz2\?\|spkg\)'
|
||||
;;
|
||||
@ -62,7 +62,7 @@ _tar()
|
||||
# get name of tar file from command line
|
||||
tar=$( sed -e 's/^.* \([^ ]*'$regex'\) .*$/\1/' <<<"${words[@]}" )
|
||||
# devise how to untar and list it
|
||||
untar=t${words[1]//[^IJzjyf]/}
|
||||
untar=t${words[1]//[^Jzjyf]/}
|
||||
|
||||
local IFS=$'\n'
|
||||
COMPREPLY=( $( compgen -W "$( printf '%s\n' $( tar $untar $tar \
|
||||
|
Loading…
x
Reference in New Issue
Block a user