Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [[ -x =command ]]
- X-seq: zsh-users 12035
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: [[ -x =command ]]
- Date: Wed, 17 Oct 2007 17:29:21 +0200
- In-reply-to: <20071017145021.GC13054@mastermind>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071016210548.26560.qmail@xxxxxxxxxxx> <20071016211319.GA2910@xxxxxxxxxxxxxxx> <20071016214100.62242.qmail@xxxxxxxxxxx> <20071017094414.GA5383@xxxxxxxxxxxxxxx> <20071017113432.GA13054@mastermind> <20071017125242.GB5383@xxxxxxxxxxxxxxx> <2d460de70710170617g2730fe81u197bd0bc2073cab8@xxxxxxxxxxxxxx> <20071017145021.GC13054@mastermind>
Matthew Wozniski <godlygeek@xxxxxxxxx>:
> On Wed, Oct 17, 2007 at 03:17:58PM +0200, Richard Hartmann wrote:
> > whence is a built-in, so unless I am missing something, it should be the
> > most portable solution.
>
> Yes, but built in to what? zsh has whence, but it certainly isn't in
> bash or sh. The most portable solution I can see is
> command which most >/dev/null && { PAGER=most; export PAGER; }
> which works for me in busybox's ash shell, as well as bash and dash.
This will break for old things like opensolaris' /bin/sh.
If you leave the 'command' bit out, it'll work:
which most >/dev/null && { PAGER=most; export PAGER; }
Yeah, an alias or a function called 'which' would break that. But it's
more portable than the 'command' approach.
However, since this is a zsh list, most people probably don't care.
And they shouldn't. :-)
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author