Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
What's the 'word' in parameter relpacement expansion?
- X-seq: zsh-users 22082
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-user <zsh-users@xxxxxxx>
- Subject: What's the 'word' in parameter relpacement expansion?
- Date: Fri, 4 Nov 2016 17:00:09 +0800
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-user <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
I think
$ a='abc def'
$ print ${a:/def}
will get 'abc ', but it is 'abc def'. So it works just like ${a//#%def}?
The 'entire word' in the document is the same thing of 'entire string'?
In zshexpn:
... or `#%' in which case the pat‐
tern must match the entire string.
The first `/' may be preceded by a `:', in which case the match
will only succeed if it matches the entire word
Thanks in advance!
Messages sorted by:
Reverse Date,
Date,
Thread,
Author