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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6803 invoked from network); 27 May 2020 19:26:53 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 27 May 2020 19:26:53 -0000 Received: (qmail 15599 invoked by alias); 27 May 2020 19:26:43 -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: List-Unsubscribe: X-Seq: 24879 Received: (qmail 14312 invoked by uid 1010); 27 May 2020 19:26:43 -0000 X-Qmail-Scanner-Diagnostics: from 2.smtp.34sp.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25821. spamassassin: 3.4.4. Clear:RC:0(46.183.9.2):SA:0(-1.9/5.0):. Processed in 4.299116 secs); 27 May 2020 19:26:43 -0000 X-Envelope-From: dave@tty1.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at tty1.uk does not designate permitted sender hosts) Date: Wed, 27 May 2020 20:25:50 +0100 From: Dave Wood To: zsh-users@zsh.org Subject: Re: Prevent auto complete of non-executable files in path Message-ID: <20200527192550.GC12065@blackswan.r0t.uk> Mail-Followup-To: zsh-users@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Authenticated-As: dave@unrealize.co.uk X-OriginalSMTPIP: 82.40.94.2 X-34spcom-MailScanner-Information: Please contact the ISP for more information X-34spcom-MailScanner-ID: 39321581684.A26D2 X-34spcom-MailScanner: Found to be clean X-34spcom-MailScanner-SpamCheck: not spam, SpamAssassin (score=-10, required 6.5, autolearn=disabled, X34SP_OVERRIDE -10.00) X-34spcom-MailScanner-From: dave@tty1.uk On 27/05/20 12:53, Alan <8fvebtoeq87@gmail.com> put forth the proposition: > Hi, > > I'm switching from bash to zsh (using version 5.8), and one thing that > bothers me is that zsh auto completes non-executable files in my $PATH. > > For example: > > $ echo $PATH > ~/bin:/usr/local/bin:/usr/bin:/bin > $ ls -l ~/bin/ > -rwx------ 1 user staff 95 Jun 5 2019 asdf1 > -rw------- 1 user staff 95 Jun 5 2019 asdf1~ > -rwx------ 1 user staff 95 Jun 5 2019 asdf2 > -rw------- 1 user staff 95 Jun 5 2019 asdf3 > $ asd > external command > asdf1 > asdf1\~ > asdf2 > asdf3 > > ...whereas in bash, it would only auto complete asdf1 and asdf2 because > those are the only 2 files in ~/bin/ that are executable: > > $ asd > asdf1 > asdf2 > > How can I get zsh to only auto complete executable files in the $PATH? > > Thanks for your help, much appreciated! Hi Try: setopt hashexecutablesonly in your ~/.zshrc -- Dave