From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 765 invoked from network); 4 Nov 1998 20:50:38 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Nov 1998 20:50:38 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id PAA02627; Wed, 4 Nov 1998 15:45:37 -0500 (EST) Resent-Date: Wed, 4 Nov 1998 15:45:28 -0500 (EST) From: "Michael Barnes" Message-ID: <19981104154358.A1563@mibarnes.lib.vt.edu> Date: Wed, 4 Nov 1998 15:43:58 -0500 To: zsh-users@math.gatech.edu Subject: Re: scripting problem: vi and multiple arguments Mail-Followup-To: zsh-users@math.gatech.edu References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1 In-Reply-To: ; from Jason Price on Wed, Nov 04, 1998 at 03:25:18PM -0500 Resent-Message-ID: <"E4gni3.0.Re.dpBGs"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1922 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu use $EDFILES as an array, im not sure how that gets set but do something like EDFILES=(*.c) EDFILES=($EDFILES *.h) then vi $EDFILES will do what you like, it will expand to a list of values and not one string. look under the zsh parameters manual or info section for more info. Mike On Wed, Nov 04, 1998 at 03:25:18PM -0500, Jason Price wrote: > I'm writing a front end to RCS. (very very small) to deal with people > being forgetful about removing file locks. > > I want to parse the command line to the script like this: > > rvi file1 file2... > > And then I want to call vi like this: > > vi file1 file2 > > however, as I loop through the arguments to rvi, unlocking as needed, yadda > yadda, I build a variable called $EDFILES > > then I call > > vi $EDFILES > > however, zsh is sending all of $EDFILES to vi as one string to argv[1]. I > want each entry in $EDFILES to be a seperate entry into argv. > > How can I do this? > > Should I build $EDFILES differently? > > I could do: > > for i in $EDFILES; do > vi $i > done > > but that would be different from how vi works with multiple files, and I > want this to be as seamless as possible.... > > RTFM's welcome with a pointer to the right FM. > > Thanks for any help; > Jason > > -- > "Where will I go?" "Somewhere where they know nothing about computing... > Where they wouldn't know a RAM chip from a potato chip!" > "But I don't want to visit Microsoft!" --the PFY and the BOFH > Jason Price jprice@gatech.edu Theta Xi, Beta Alpha 449