Skip to content

Commit 242e26c

Browse files
committed
fix(tar): do not associate with *.gem.<compress-extension>
To my knowledge, gems are just `*.gem`, not e.g. `*.gem.xz` etc.
1 parent 5b842ff commit 242e26c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

completions/tar

+4-4
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ __tar_cleanup_prev()
441441

442442
__tar_detect_ext()
443443
{
444-
local tars='@(@(tar|gem|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)|zst))|t@([abglx]z|b?(z)2|zst)|cbt|xbps)'
444+
local tars='@(@(tar|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)|zst))|t@([abglx]z|b?(z)2|zst)|cbt|gem|xbps)'
445445
if [[ ${COMP_WORDS[0]} == ?(*/)bsdtar ]]; then
446446
# https://github.com/libarchive/libarchive/wiki/LibarchiveFormats
447447
tars=${tars/%\)/|pax|cpio|iso|zip|@(j|x)ar|mtree|a|7z|warc}
@@ -473,13 +473,13 @@ __tar_detect_ext()
473473
# Pass through using defaults above
474474
;;
475475
*[Zz]*f)
476-
ext='@(@(t?(ar.)|gem.|spkg.)@(gz|Z)|taz)'
476+
ext='@(@(t?(ar.)|spkg.)@(gz|Z)|taz)'
477477
;;
478478
*[jy]*f)
479-
ext='@(@(t?(ar.)|gem.)bz?(2)|spkg|tb2)'
479+
ext='@(t?(ar.)bz?(2)|spkg|tb2)'
480480
;;
481481
*[J]*f)
482-
ext='@(@(tar|gem|spkg).@(lzma|xz)|t[lx]z)'
482+
ext='@(@(tar|spkg).@(lzma|xz)|t[lx]z)'
483483
;;
484484
esac
485485
}

0 commit comments

Comments
 (0)