From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20818 invoked by alias); 26 Sep 2013 23:19:53 -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: 18008 Received: (qmail 18661 invoked from network); 26 Sep 2013 23:19:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW, TRACKER_ID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.223.169 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 :content-type; bh=zwXNQtBKJWjRejbOqDZSlLVIHesL7ssCdm+76UXXHBM=; b=S34QkK5w4clVTZp4iA0eAzwMQhHpCVcKvIoZ7b2dDf2ZsQhnJfIswNcq9fj5kRbIuU TzrwyaTd/sBwAf9NyYrNYBIGamDg9+uCrtrn/hHc4krEjCnOPQFIIpLHHGdzGpf3XmQx nXg8bfa63Y17Xc9nK2E7uSkynVCsyfkEb6AGfKZVAsOnH/vvmEj011MunYkOLejZRS9d r0Tf2+bMn59xF2WhVn5E+KwL+Fdj5AaYX2jeAdcQSk8tocl5C13VLeELGz09XZqXGuEI CjUF8y1XK8Uo8tCcl8BGAW3GAzfYmkrurYtMnACaL5LTg2gCElO1R2AWaDmk4SZ3g0S4 umbg== X-Received: by 10.42.134.196 with SMTP id m4mr4147025ict.79.1380237579289; Thu, 26 Sep 2013 16:19:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: TJ Luoma Date: Thu, 26 Sep 2013 19:18:59 -0400 Message-ID: Subject: Re: Any way to have ".sh" be optional? To: Zsh-Users List Content-Type: multipart/alternative; boundary=90e6ba6137289e926704e7519ad3 --90e6ba6137289e926704e7519ad3 Content-Type: text/plain; charset=UTF-8 command_not_found_handler Yet another reason Zsh is amazing. Thanks to everyone who took the time to reply. "command_not_found_handler" is pretty much exactly what I was hoping for. Tj On Thu, Sep 26, 2013 at 4:12 PM, TJ Luoma wrote: > The Subject line may not be the best description of what I want, but > it was the best I could come up with. > > I tend to name all of my Zsh scripts to end with '.sh' so I can easily > `fgrep -i Whatever *.sh` when I'm looking for something. > > However, I would rather not have to type the ".sh" if not necessary. > (Yes, I am that lazy.) > > So assume I have a script "mkseries.sh" which I do not want to rename > but which I want to use in zsh just by typing "mkseries" -- is there a > way to tell zsh "If I use the command 'foo' and there is no 'foo' but > there is 'foo.sh' then I want to use 'foo.sh'? > > As always, thanks for your time, > > Tj > > > ps - I am only asking about this when using Zsh in Terminal as my > login shell; in shell scripts I don't mind adding the ".sh" > --90e6ba6137289e926704e7519ad3--