zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: why won't this function work?
Date: Wed, 7 Jul 2004 23:49:19 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.60.0407072338500.13643@toltec.zanshin.com> (raw)
In-Reply-To: <Pine.NEB.4.60.0407080235030.11144@zk.serrfuryy.bet>

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@freeshell.org 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.


  reply	other threads:[~2004-07-08  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-08  2:37 gj
2004-07-08  6:49 ` Bart Schaefer [this message]
2004-07-08  9:48 ` Peter Stephenson
2004-07-12 21:55   ` gj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.60.0407072338500.13643@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).