From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14698 invoked by alias); 24 Sep 2016 19:21:32 -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: 21962 Received: (qmail 2715 invoked from network); 24 Sep 2016 19:21:32 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f181.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.181):SA:0(0.0/5.0):. Processed in 0.41839 secs); 24 Sep 2016 19:21:32 -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.181 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:content-transfer-encoding; bh=hN4p7ytZSS/5dib55yKE+zJP5wLErc2lAIiPtX9zz4g=; b=P3YgR7grjOY/UXRw22HXGuq46l450Jb8i0+PsbF0iPb7oPRbai+PlmxeKWkmziZPIi EptaAHafHyORfCER/AEfhkAUP8dMJ/qO4aYyeEx5Gg2258N5Wm6dIrAupyO+5fjGHa3l OF3l0JCLFVEU0yOrpxX3mi1NUTi4fNDzhOG3Da2FQhILakHvXIut1N77fNGLRQVY34BI 6QoAMJ9e+iWxWOIGEFr/HO97ue846pqDpae1IObI0j9w9LqcWpE/L7eEgccvylC6cAiN 9NzVZtSI7ofTwpbDCL8aI1GHJnHutV6aRZd78IV72/l8Y3j4ghNP19ffGBqUBYiJEXW1 3Q4g== 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:content-transfer-encoding; bh=hN4p7ytZSS/5dib55yKE+zJP5wLErc2lAIiPtX9zz4g=; b=ROx5SN8Hr1oxVek0EFe5Uup8lMBw0q4K7KlwyI8YgGi4deLFA51bz9dq5X4gh3WBQw b3R8XXcVY1nbo30sluSiI6mzMpwgSi524A7CFwS9Gin2Oex5RJv1kMXjTmccxJx3MsI/ K2A7QaD/77pkmASFLLV49YJq2qIl6l5YqaKt2zNVBQKyU7pJZ1s/A1YAF+yvhsDHPZqx 599l6e0e6lOSCaQP4W9+r2Md66sF3TRNDC/DoXiNlUyqCNtieFO+rTjmAISWXh2zIdh9 MAHom5jR9DBD/Qw0f3tIaq09dTapZVdC+fdBaviHvxm2HDg4AFofCqeYn59PqqeARrZX 6syg== X-Gm-Message-State: AA6/9RkIm4DipIGdoLS2syR0+SrMWVk7ArfEF1ymYVrgQ6Y6VdVwyW/avxLVh4HjXHh+hqXCt2COaWjH18FOYQ== X-Received: by 10.200.51.54 with SMTP id t51mr13459363qta.110.1474743411158; Sat, 24 Sep 2016 11:56:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Sebastian Gniazdowski Date: Sat, 24 Sep 2016 20:56:30 +0200 Message-ID: Subject: Re: Feature request: set extension for =( ) created file To: Vadim Zeitlin Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 24 September 2016 at 19:55, Vadim Zeitlin wrote: > On Sat, 24 Sep 2016 19:51:26 +0200 Sebastian Gniazdowski wrote: > > SG> Hello, > SG> when e.g. editing a file directly from git: > SG> > SG> vim =3D( git -C /home/user/github/proj.git cat-file blob 1e08920 ) > SG> > SG> One will not get proper syntax highlighting because the file will be > SG> e.g.: /tmp/zshoF8Hlc, without extension like .java. > > How could the shell possibly do anything that would be better than the > usual workaround of > > vim -c 'setf java' =3D(...) > > ? You would still need to specify the extension somehow and specifying th= e > file type for Vim directly is exactly as simple and doesn't require any > changes to the shell. > Yes coming up with how to pass extension to =3D( ) is a TODO. Maybe it indeed isn't worth implementing, but IMO it's almost always the case when using =3D( ) causes an inevitable drawback of feeding the program with random file name which is somewhat a random data at the start. Extensions are vital part of file names, what program doesn't use them? In my script I use $EDITOR, not exactly vim so I will be implementing a switch statement and supporting whatever editor there is and is worth it =E2=80=93 except NOT, will not do this, because it also complicates the command that I'm pasting into BUFFER. Best regards, Sebastian Gniazdowski