GNU bug report logs -
#66532
29.1; dired-guess-default command for tar.zst file fails
Previous Next
Full log
Message #11 received at 66532 <at> debbugs.gnu.org (full text, mbox):
> Does the patch below fix this?
>
> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
> index fc3f6f4..458acad 100644
> --- a/lisp/dired-aux.el
> +++ b/lisp/dired-aux.el
> @@ -1172,7 +1172,7 @@ dired-guess-shell-alist-default
> "unxz")
>
> ;; zstandard archives
> - `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c %i | tar -xf -")
> + `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c * | tar -xf -")
> `(,(rx ".zst" eos) "unzstd --rm")
>
> '("\\.shar\\.Z\\'" "zcat * | unshar")
Yes, this patch works for me for a single tar.zst archive.
However, when I mark multiple tar.zst archives and then run the
suggested shell command (with *) on all of them, only the first archive
gets extracted.. I just opened the Emacs manual dired section and found
the `?' is a placeholder for which the command gets executed separately
for each marked file. So with
unzstd -c ? | tar -xf -
each marked archive gets successfully extracted. Here also formatted as a patch;
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 2ff620065a5..e0bcae6b005 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1176,7 +1176,7 @@ dired-guess-shell-alist-default
"unxz")
;; zstandard archives
- `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c %i | tar -xf -")
+ `(,(rx (or ".tar.zst" ".tzst") eos) "unzstd -c ? | tar -xf -")
`(,(rx ".zst" eos) "unzstd --rm")
'("\\.shar\\.Z\\'" "zcat * | unshar")
I am just wondering that I didn't find the questionmark placeholder in
any of the other suggested commands for compressed tar files, not sure
if they work fur multiple marked files, I didn't test that.
This bug report was last modified 1 year and 205 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.