From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17736 invoked by alias); 15 Aug 2011 08:29:21 -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: 16246 Received: (qmail 22094 invoked from network); 15 Aug 2011 08:29:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Qm9AQx570hWODczD8dn1njP8icLsHpBzucg+/rjuPBU=; b=Y27G9aP+dhWNKKrehYDlGs6pfpC8F4zOLJCIlBfH5Ao+I622RTnUCMwUSDfaupSwt5 Q8cEh8WASfLH2Ic9MS5SyFyCbNso/ROZLzk+ebgeEFSo7o36W/FDROD1pAVbtrv7S+2+ pcKezO6S47rLj9rg0kaOk30jndtyXLsXkFBrc= MIME-Version: 1.0 In-Reply-To: <110814181108.ZM20034@torch.brasslantern.com> References: <110812200942.ZM8287@torch.brasslantern.com> <110814181108.ZM20034@torch.brasslantern.com> From: Julien Nicoulaud Date: Mon, 15 Aug 2011 10:28:49 +0200 Message-ID: Subject: Re: Idiom for booleans To: Bart Schaefer Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=0016367f9678ab847f04aa870ec1 --0016367f9678ab847f04aa870ec1 Content-Type: text/plain; charset=ISO-8859-1 Thanks, it works perfectly now ! (Also, Ctrl+C on an empty buffer did output a "command not found" message with the previous command run...) I attached a branch to Micah's bug: https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/624565 2011/8/15 Bart Schaefer > On Aug 12, 10:26pm, Micah Elliott wrote: > } Subject: Re: Idiom for booleans > } > } > On Aug 12, 5:24pm, Micah Elliott wrote: > } > } > } > } % (( 0 )) > } > } ((: command not found > } > } > This has to be something in your configuration. Try it with zsh -f ? > } > } . /etc/zsh_command_not_found > } > } That's a pretty handy utility (that I would expect to be popular), but > } for now I'm going to live without it. I see it's a problem on the last > } few Ubuntu releases, and I can't believe other people aren't seeing > } the problem. > > I've had a Ubuntu laptop for a couple of years now and never noticed > this utility (not that I'd have used it if I had) so it's not all that > surprising to me that it isn't a widespread problem. > > Ironically, the very first line of the precmd function defined by > /etc/zsh_command_not_found begins with > > (($?)) && ... > > Obviously this implementation predates zsh introducing its own hook for > command-not-found. It could have been done correctly, though, by the > simple expedient of > > (($? == 127)) && ... > --0016367f9678ab847f04aa870ec1--