Skip to content

Commit

Permalink
tar: Don't take -I to mean bzip2.
Browse files Browse the repository at this point in the history
It hasn't meant bzip2 since GNU tar 1.13.18 (2000) and means something
different since 1.22 (2009).
  • Loading branch information
scop committed Sep 24, 2012
1 parent 8e63eaf commit f321357
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions completions/tar
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ _tar()
fi
return 0
;;
+([^IZzJjy])f)
+([^ZzJjy])f)
ext="$tars"
regex='\(\(tar\|gem\|spkg\)\(\.\(Z\|[gx]z\|bz2\?\|lzma\)\)\?\|t\([glx]z\|bz2\?\)\)'
;;
*[Zz]*f)
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\)'
;;
Expand All @@ -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 \
Expand Down

0 comments on commit f321357

Please sign in to comment.