Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Idiom for booleans
- X-seq: zsh-users 16246
- From: Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Idiom for booleans
- Date: Mon, 15 Aug 2011 10:28:49 +0200
- Cc: zsh-users@xxxxxxx
- 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=
- In-reply-to: <110814181108.ZM20034@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAELbujo=KyJyzzo1vW+ydLVA=PddguguXkBr7yN3zvmOgmYFpQ@mail.gmail.com> <110812200942.ZM8287@torch.brasslantern.com> <CAELbujqBkE_zUG9M2+DS4mv=TxxKT=Rq4vH2fhXsbJ235B4nAA@mail.gmail.com> <110814181108.ZM20034@torch.brasslantern.com>
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 <schaefer@xxxxxxxxxxxxxxxx>
> 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)) && ...
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author