Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Idiom for booleans
- X-seq: zsh-users 16233
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Idiom for booleans
- Date: Sun, 14 Aug 2011 18:11:08 -0700
- In-reply-to: <CAELbujqBkE_zUG9M2+DS4mv=TxxKT=Rq4vH2fhXsbJ235B4nAA@mail.gmail.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>
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