zsh-users
 help / color / mirror / code / Atom feed
From: Bernd Eggink <eggink@uni-hamburg.de>
To: zsh-users@math.gatech.edu
Subject: Re: OPTARG not being set?
Date: Tue, 02 Feb 1999 09:52:45 +0100	[thread overview]
Message-ID: <36B6BCDD.6834B3C6@uni-hamburg.de> (raw)

Sweth Chandramouli wrote:

...
>         this is the start of the function:
> 
> unset USER_SPECIFIED_PATH;
> while getopts ":p" CMD_LINE_OPT ; do
>    case ${CMD_LINE_OPT} in
>       p  ) USER_SPECIFIED_PATH=${OPTARG};;
>       \? ) print "unknown option \"-${OPTARG}\""
>            print 'usage: '
>            print 'addpath [-p PSEUDO_ARRAY] first_item:second_item:...:nth_item'
>            return 1
>    esac;
> done;
> 
>         after this loop finishes, however, USER_SPECIFIED_PATH is still
> null.  i've put some echo statements in the case clause for option p,
> which confirm that OPTARG is never being set, even though CMD_LINE_OPT
> is matching 'p'.  does anyone have any idea why?

Options with arguments are denoted as "p:". ":p" has a different
meaning; see "man zshbuiltins".

Regards,
	Bernd
-- 
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



             reply	other threads:[~1999-02-02  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-02  8:52 Bernd Eggink [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-02-03 18:35 Sweth Chandramouli
1999-02-03  8:23 Bart Schaefer
1999-02-03  8:03 Bart Schaefer
1999-02-03  7:38 Sven Wischnowsky
1999-02-03  3:56 Sweth Chandramouli
1999-02-02  5:54 Sweth Chandramouli

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=36B6BCDD.6834B3C6@uni-hamburg.de \
    --to=eggink@uni-hamburg.de \
    --cc=zsh-users@math.gatech.edu \
    /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).