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 9351 invoked from network); 8 Dec 2021 01:17:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Dec 2021 01:17:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1638926233; b=mfxjbOsO8hc4H4b+R/YIjqd7Q1RxZwanPMpJgM3uEW3qH9U0Q5JZNYncJEEV1XPAGXhwga37Ot fcuGTsoemoiiTpupB0FKuRXpAs1iItaZgCaPeNniwfWAEoN+srggjEgETsGojWB50ylOx0xINo 1e2a+QuMFeXR+KmDxK4Cwlb9Cbpe0cpLZvUklfjvld8bnPy3gGtbu2EAkvMa7Oi+00RZ+orH65 ZXgBJFmhhWgkNCy8b7VHuypq40AnHIYWpavmSQG7j63Vekr8F/WBVWoXOMhrwPry1L6Bd7RL0a QN0embQVeg7DpHam2zvRvOAn+pIBFJuwBy+vZWHufS0uqA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (pug.qqx.org) smtp.remote-ip=50.116.43.67; dkim=pass header.d=schrab.com header.s=mail header.a=rsa-sha256; dmarc=none header.from=schrab.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1638926233; bh=qHGwVsluqQSFyXWgVWgXfj7Feq2i0eRZFxvTvs8XlQw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature; b=BpnB/JjtNk/R8VJOzgbcQs7V7zj2Osr2CNnlEXVlt+0bozsxCt0D+VKz/ftqPYAJeJpdpM3/K0 hqxkLsms1ueeyQ/GrHvxp6cNiwQzYkBOCAFKUkyAf39tuvXxagFHJRdEaumxRkF+XzrQT68Oh9 iCUCNROIC+k1MaIvY6iCguVRkE6rEhlhrWYiZ5JfTLrR7wj061Y4fTKmwDM2sG9yd3K8+MfMmi k93xG7oN782cE8kmKVcKoP9grrw+sWlJWzrd1HMGXhvtb43+iIjgE3vmURZDliSRGB9eWIAtKM 2xv0vIrCHRpVGTExw8b4kPciECA+LY3Dzh5x0ZU/wJJoGw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=A69pOzdoCmRVv3UIwB5kVldS35zIPoaNQO2ZXLYygDw=; b=XjknsrE/1hN6mZhQP3/GnXQlAi SEPPoaEtqNPJfJC8ish4xZEmOSBpwnPKZFvi8CnUMyysUZzN3xNq6Go8ZESgfjBkHkfmacfx2x0w3 TOCQJ6Hpo5n+mYk73MYQTs1PXw0YKNQbM5byL7KT0rN/1tpJAIscG4RUz5lNd+pEb6bTarG0xRbs1 6vyG6lPTdOBXT/EA/ggs9QBhOGM9NSsqs9jwz8zLreYV5zYwYIupX0Y5ssRdojQxQeXRNJh5aLfXs pbSjVQQ1oP8/HCLJhFIZdti4EZcYSmuLWEIecZOO7VFuJFcENhb3pzwqsSLbDLXX0yTOILo7B8E9W DUCku8FQ==; Received: from authenticated user by zero.zsh.org with local id 1mula5-000ACk-3x; Wed, 08 Dec 2021 01:17:13 +0000 Authentication-Results: zsh.org; iprev=pass (pug.qqx.org) smtp.remote-ip=50.116.43.67; dkim=pass header.d=schrab.com header.s=mail header.a=rsa-sha256; dmarc=none header.from=schrab.com; arc=none Received: from pug.qqx.org ([50.116.43.67]:34598) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mulZM-0009sc-B3; Wed, 08 Dec 2021 01:16:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schrab.com; s=mail; t=1638926187; bh=qHGwVsluqQSFyXWgVWgXfj7Feq2i0eRZFxvTvs8XlQw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LX/nUxVcfvEslMi7IAXw2B4j95d826iLyUj6PFnhjtzqyPQFSkkRDTiUznbsdR9Ll DEwcqBqpzEbvjADMxy3O+6k8U+xjSJvatAj788d4M0sZUwHphC0Tc2mRVeo0n8g7e/ Dk44h0la/uizFuof7ddeQpp8NH2Y2PBN/hVX2DczuqRAKAuOB5RFuc+b0nwrFWWYgy qjVjO69sAZmLkijOXFHuDbz2kV++Y2P9ExHEhNcDr7ggtCKKP4h0LnfNBrsc14CX48 7xDrCEBPc4PG+tEZddDp62kldEuhwEMC07wTm5LfkoEtvCGc0teguQA+r0yPMAs7kM 5m9W3ZYjwl56g== Received: by pug.qqx.org (Postfix, from userid 1000) id 6CB681DE68; Tue, 7 Dec 2021 20:16:27 -0500 (EST) Date: Tue, 7 Dec 2021 20:16:27 -0500 From: Aaron Schrab To: Bart Schaefer Cc: Zsh hackers list Subject: Re: [FEATURE][PATCH] Complete local executables with ./ prefix, if prefix-needed is false Message-ID: Mail-Followup-To: Bart Schaefer , Zsh hackers list References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Seq: 49638 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: At 16:50 -0800 07 Dec 2021, Bart Schaefer wrote: >On Tue, Dec 7, 2021 at 4:23 PM Aaron Schrab wrote: > >> >> The already existing uses of `prefix-needed` are ones that I don't think >> setting it to false would cause any serious problems. But for this I >> think it's fairly dangerous >> > >Hm. I haven't applied the patch to see what effect it has, but it appears >it would cause the "./" to be prefixed onto the command word? If so, >there's visible feedback; if not, the danger would be of invoking a command >that's in $path instead of the intended local executable. > >So I'm not strongly concerned about danger; what is the behavior you'd find >troubling? My main concern is if someone would be in the habit of doing command completion and then hitting enter without looking at the results. If done when there's a typo in the prefix that was used it could complete to something from an untrusted directory instead. Yes, this requires a few things to go wrong in just the right way for it to happen. But enabling this option would generally be a one-time thing for a user, and they may not consider this type of case at the time, and after awhile even forget about it.