void-packages/srcpkgs/bash-completion/patches/complete-xbps.patch

25 lines
753 B
Diff

Complete tar with .xbps files.
Backported from upstream https://github.com/scop/bash-completion/pull/688
--- a/completions/tar
+++ b/completions/tar 2022-01-23 11:42:19.699734913 -0300
@@ -422,7 +422,7 @@
__tar_detect_ext()
{
- local tars='@(@(tar|gem|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)|zst))|t@([abglx]z|b?(z)2|zst))'
+ local tars='@(@(tar|spkg)?(.@(Z|[bgx]z|bz2|lz?(ma|o)|zst))|t@([abglx]z|b?(z)2|zst)|gem|xbps)'
ext="$tars"
case "$tar_mode_arg" in
@@ -430,7 +430,7 @@
# Should never happen?
;;
?(-)*[cr]*f)
- ext='@(tar|gem|spkg)'
+ ext='@(tar|gem|spkg|xbps)'
case ${words[1]} in
*a*) ext="$tars" ;;
*z*) ext='t?(ar.)gz' ;;