From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11351 invoked from network); 3 Jun 2021 07:51:49 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Jun 2021 07:51:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=mqWvTKm/0tl5knSnXtkWwnVpwURq8saa6o7xBdTx9Oc=; b=z+PkyQBrXLCyPzFv6XP1dedkA+ iEQlXsrYVq6+oJ5zTJ083jZBUYqXKyDwotCUEsbpgfhZblcs4g2eIGTKMIAvLAGwhSGWDn0arMORm lMZLc7gehra9UXnW50jTPbtrOxb0qJqKEvvBOgVWL3y1ZLSI+LUFvBVLRzb5sXi5HnkYJ/dJ2hcM4 jP/54Sx0gKQOkku0+d34k8O836iH14MCGXW9oo0L5rgJADSG8P7EHaiD5ndTmFJF8C++SgpEX00nl 7BKmQTWXHPL6mnXz2mxL3DBL/3y2w//DWWAhYsUZkAZ0ng0oYfzyfgGUYvkSWKUl+BcRY5WxIHlOW 48NjfDnw==; Received: from authenticated user by zero.zsh.org with local id 1loi8q-000JSs-L6; Thu, 03 Jun 2021 07:51:48 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1loi8c-000JA0-TK; Thu, 03 Jun 2021 07:51:35 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1loi8Y-00044A-Tj for zsh-workers@zsh.org; Thu, 03 Jun 2021 09:51:32 +0200 In-reply-to: From: Oliver Kiddle References: <92d2b09c-9559-7085-a521-29714e38f02c@iDaemons.org> <20210529114108.GA25290@tarpaulin.shahaf.local2> To: Zsh hackers list Subject: Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15632.1622706689.1@hydra> Date: Thu, 03 Jun 2021 09:51:30 +0200 Message-ID: <15633-1622706690.918759@DgKw.qSyM.zE76> X-Seq: 49001 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 31 May, Bart Schaefer wrote: > > Akinori MUSHA wrote on Fri, May 28, 2021 at 22:35:08 +0900: > > > This patch makes the name of a temporary file to have a .zsh suffix > This is not entirely far-fetched, if you're on a Mac and have XCode > fully installed, "open /tmp/blablah.zsh" may actually run zsh. > > Is this worth worrying about? The command it runs comes from a specific editor zstyle, $VISUAL or $EDITOR, all of which ought to only ever be set to a text editor. It's always possible that someone shoots themself in the foot in this manner and it was worth considering. I'd not worry overly unless such a setup appears to be default for some OS/distribution. The function already looks to see if it has vim or emacs. Perhaps it could check for open/xdg-open. I couldn't find a mention of the editor style in the documentation but if there, a warning could be attached there. Anyway, I have pushed the patch. Oliver