Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Feature request? print -e to eval ?
- X-seq: zsh-workers 41642
- From: Marc Chantreux <khatar@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Feature request? print -e to eval ?
- Date: Tue, 5 Sep 2017 13:17:14 +0000
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
hello people,
i don't know about you but i often eval something i just printed.
for exemple:
status_as_flag () { eval $( print -P "${1?flag name}=%(?.true.false)" ) }
when it would be nice to write
status_as_flag () { print -eP "${1?flag name}=%(?.true.false)" }
(no more subshell and more readable)
what to you think about the idea ?
regards
--
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
"Don't believe everything you read on the Internet"
-- Abraham Lincoln
Messages sorted by:
Reverse Date,
Date,
Thread,
Author