From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Eliachevitch Newsgroups: gmane.emacs.bugs Subject: bug#66532: 29.1; dired-guess-default command for tar.zst file fails Date: Sat, 14 Oct 2023 18:41:52 +0000 Message-ID: <877cnp57v9.fsf@posteo.de> References: <87bkd2315h.fsf@posteo.de> <83zg0lsouv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23007"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66532@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 14 21:20:49 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrkBs-0005op-JG for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Oct 2023 21:20:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrkBj-00069g-7i; Sat, 14 Oct 2023 15:20:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrkBi-00069O-Dc for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 15:20:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrkBi-0006n2-5X for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 15:20:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrkC5-00079i-L3 for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 15:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Eliachevitch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Oct 2023 19:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66532 X-GNU-PR-Package: emacs Original-Received: via spool by 66532-submit@debbugs.gnu.org id=B66532.169731124627477 (code B ref 66532); Sat, 14 Oct 2023 19:21:01 +0000 Original-Received: (at 66532) by debbugs.gnu.org; 14 Oct 2023 19:20:46 +0000 Original-Received: from localhost ([127.0.0.1]:50545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrkBp-000797-MI for submit@debbugs.gnu.org; Sat, 14 Oct 2023 15:20:45 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:38223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrkBl-00078p-4N for 66532@debbugs.gnu.org; Sat, 14 Oct 2023 15:20:45 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A05FC240027 for <66532@debbugs.gnu.org>; Sat, 14 Oct 2023 21:20:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1697311211; bh=cjBmK4Zc5rN7RD2PJ4oFRXxVZsQDL9hD1vli8xku3C0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=BxgjowVMTuUS9DF3ZJbxK7Y0iplJD0s4unIsMC8bXLTTLwj7bLKINQK2/erIhrHwx diV+i1QMmPcFy1ZJQMTsKL4/XYoIiD1SamALKIbA/mAIvZaO+1v5aOdjssy6mCjLID yr5nFU4DYxrlkYe5JRq1ZWXzC3pqcR+POgPjL9QicdLdj6f+iFSBuzERo9yh+8akDu WVRRNB82QPrcRrgH0BOaSiy2qzj6ERuwucqAzLao61B00sEKUX0J7d+O4/5xBdyXDv nyDbbsNbeWomyo81wuT725f7YDEqnuVQiJ8ANXLFtU+p0/xqLp0d2XGVuie8UH10yh Cm7Lr0XkT52Vg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S7CrC23hgz6tsj; Sat, 14 Oct 2023 21:20:10 +0200 (CEST) In-reply-to: <83zg0lsouv.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272463 Archived-At: > 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.