From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15002 invoked by alias); 25 Sep 2016 06:18:09 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21974 Received: (qmail 18752 invoked from network); 25 Sep 2016 06:18:09 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f178.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.178):SA:0(0.0/5.0):. Processed in 0.353049 secs); 25 Sep 2016 06:18:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.178 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/DWIwM0ixdJaDx9Y8tLh4gmV5wV/w/tobHTnVYgk5ws=; b=dTKIiduZLxyWUVn4MuL0UB3OjknXV6QAmtfeiKu2melXLa+XgRtE/TMVjOVPlzgAZv aG9tTXwh+AR4syYTiJ3zhEdyJHXJPu6YV8Y9tz9BAeXMe3r7VLbCAop9MsxkxA/7HshB rK4r/n1btXmUgtDWd8c3IxyG7PYZcR6Lv2SxhXmyuhS4DMgy18Pz34skgoiIFrd861e8 7qptVzO3mLpdKPG/VIxfX6UIt/Ml7OAxHb9mXkjl8+h+UBz4dZ9KSReD7Ad2eYHwhh1i Gpn8nX46X9podknkuwepreNZ/cQaSybnkTLQD6o4MJwqC6IOUFTJgtkM9RuS0aRPXGQU RkQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/DWIwM0ixdJaDx9Y8tLh4gmV5wV/w/tobHTnVYgk5ws=; b=AbyBEzyaPjDoqu/aSMPr8vtdHxAuaP8EpIDxABO72MI2C+1EfIsZzcW4KMopeNc4Nu snf0a/9Amyq7lWT1l704lGie8TDNS4hM1XLEryKfhweJ6a2nWhMe1Ra9zoMcoztyG1PC 7Dn6/St00rIQN6GciCljCnYd93UrXQ/N6cVb5JlH0FN/1Rl3oIveKGBAAyBP21nlIgn1 5Tq8SupARdjZzj2C7jU783o38pi9Hm9GK1GqXwIPLIqn+zQ74UNnfVgZIxi4JQ83fsXh +3IRCwOWXX31lo8Cmgdr8j5vCyOXuMGE0865zhO9geTEbKeDDrkUQtxsZM2Y2LKt7RnF nUsA== X-Gm-Message-State: AA6/9RlcTBru0IrqYS/JNtNwUQJbKsCELi/LwHwBqoDBtqI90BXSdI4N3hMXDxW6pJMrET3J5XWyZ+pIsHKe9w== X-Received: by 10.237.58.232 with SMTP id o95mr16093540qte.33.1474784281282; Sat, 24 Sep 2016 23:18:01 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <160924221731.ZM30342@torch.brasslantern.com> References: <4DC55226-A041-42E5-B8B1-3AB1E7E6AB53@macports.org> <1082821474761933@web24j.yandex.ru> <160924221731.ZM30342@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Sun, 25 Sep 2016 08:17:40 +0200 Message-ID: Subject: Re: Feature request: set extension for =( ) created file To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 25 September 2016 at 07:17, Bart Schaefer wrote: > However, neither that nor any of your suggestions would accomplish > altering the filename based on the file content. The file has to be > created in the parent shell before the command is even run, so that > it can be opened as the command's output; and I would not advocate > having the shell peering at the content without being explicitly > scripted to do so. Yes yes I was surprised my post could be understood as peering at content. It's like in the git example: extension is known (is obtained from git ls-tree, just like SHA of the BLOB), and can be provided to =( ) which runs command that accesses the content. Other example: downloading a HTTP address, having Content-Type available, knowing what the extension should be. And a standard situation: creating specific content for specific program expecting specific, known extension (a case if only it's not typical and of course common less program, it's part of my point in general: "what programs do not use extensions?"). First thing that came to my mind is use of [], not () like Nikolay proposed, so e.g. vim =( cat ... )[java], although it also suffers from colliding with globbing, which is IMO a serious drawback. Best regards, Sebastian Gniazdowski