Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Effect of typeset -U for colon separated paths?
- X-seq: zsh-users 4538
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Hannu Koivisto <azure@xxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: Effect of typeset -U for colon separated paths?
- Date: Fri, 14 Dec 2001 15:36:58 +0000
- In-reply-to: <87snaet0r5.fsf@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87snaet0r5.fsf@xxxxxxxxxxxxxxxx>
On Dec 14, 3:00pm, Hannu Koivisto wrote:
}
} BAR=foo:bar:baz
} foo=(${(s:::)BAR}
}
} ...but s expansion flag couldn't split with plain ":" (for
} understandable reasons). I couldn't figure out any working way to
} quote it either.
Andrej has already mentioned "typeset -T", but to quote the doc for the
flags j, l, r, s, etc.:
The following flags (except p) are followed by one or more arguments as
shown. Any character, or the matching pairs `(...)', `{...}', `[...]',
or `<...>', may be used in place of a colon as delimiters, but note
that when a flag takes more than one argument, a matched pair of
delimiters must surround each argument.
So for example:
BAR=foo:bar:baz
foo=(${(s.:.)BAR})
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author