FS#72843 - zsh completion for tar for zst archives

Attached to Project: Arch Linux
Opened by Peter (pkap) - Friday, 26 November 2021, 11:02 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 02 May 2023, 21:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

tar.zst archives are skipped by zsh completion using tar/bsdar. This is seems to be fixed in zsh master, though. Maybe this would be appropriate to patch as tar.zst archives are all over and lots of people use zsh.

Example: $ bsdtar -tf linux<tab> # tar.zst files are skipped completely


diff --unified --recursive --text --color zsh-5.8.old/Completion/Unix/Type/_tar_archive zsh-5.8/Completion/Unix/Type/_tar_archive
--- zsh-5.8.old/Completion/Unix/Type/_tar_archive 2018-06-24 02:14:58.000000000 +0200
+++ zsh-5.8/Completion/Unix/Type/_tar_archive 2021-11-26 11:59:24.920675646 +0100
@@ -21,7 +21,7 @@
elif [[ "$1" = *J* ]]; then
_files "$expl[@]" -g '*.(tar|TAR).(lzma|xz)(-.)'
elif [[ "$_cmd_variant[$service]" == (gnu|libarchive) ]]; then
- _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|)|(tbz|tgz|txz))(-.)'
+ _files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|.zst)|(tbz|tgz|txz|tzst))(-.)'
else
_files "$expl[@]" -g '*.(tar|TAR)(-.)'
fi
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 02 May 2023, 21:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  "Fixed with zsh 5.9"
Comment by Emil (xexaxo) - Tuesday, 02 May 2023, 14:13 GMT
Fairly sure this can be closed. A new version of zsh with the changes has landed a while ago.

$ pacman -Qo /usr/share/zsh/functions/Completion/Unix/_tar_archive
/usr/share/zsh/functions/Completion/Unix/_tar_archive is owned by zsh 5.9-3

$ grep zst /usr/share/zsh/functions/Completion/Unix/_tar_archive
_files "$expl[@]" -g '*.((tar|TAR)(.gz|.GZ|.Z|.bz2|.lzma|.xz|.zst|lzo|)|(tbz|tgz|txz|tzst|taz|taZ|tz2|tbz2|tlz))(-.)'
_files "$expl[@]" -g '*.((tar|TAR|cpio)(.gz|.GZ|.Z|.bz2|.lzma|.xz|.zst|lzo|)|(tbz|tgz|txz|tzst|tzo|taz|tbz2|tz2|tlz|tZ|7z|ar|iso|deb|cab|lha|mtree|rar|warc|xar|zip))(-.)'

Loading...