Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: why won't this function work?
- X-seq: zsh-users 7668
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: why won't this function work?
- Date: Wed, 7 Jul 2004 23:49:19 -0700 (PDT)
- In-reply-to: <Pine.NEB.4.60.0407080235030.11144@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.NEB.4.60.0407080235030.11144@xxxxxxxxxxxxxxxx>
- Reply-to: zsh-users@xxxxxxxxxx
It's generally preferable if you supply some details about the difference
between what does happen and what you intend to have happen, rather than
just say "doesn't work."
However, some possible clues ...
On Thu, 8 Jul 2004 gj@xxxxxxxxxxxxx wrote:
> (( " $# < 1 " )) && {
Don't put quotes around the expression inside the double parens. All that
accomplishes is to fool zsh into thinking you meant to create a subshell,
so it attempts to execute a command rather than evaluate math.
> cmd=("" `grep -w $1 $HISTFILE | sort | uniq | pr -tn` "");
Unless you have setopt KSH_ARRAYS, zsh numbers arrays from 1, not from 0,
so the leading empty element may be throwing off your subscript later. I
have no idea why the trailing empty element is there.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author