* zsh custom pipeline handler
@ 2016-03-31 10:53 disarmer
2016-03-31 14:41 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: disarmer @ 2016-03-31 10:53 UTC (permalink / raw)
To: zsh-users
Hi,
How can i define my own builtin, which can get pipeline, like zsh's
builtin "repeat"?
For example, i want my own repeat function, which will work like
builtin:
myrepeat 2 date|wc -l
Thank you in advance!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zsh custom pipeline handler
2016-03-31 10:53 zsh custom pipeline handler disarmer
@ 2016-03-31 14:41 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-03-31 14:41 UTC (permalink / raw)
To: zsh-users
On Mar 31, 1:53pm, disarmer wrote:
}
} How can i define my own builtin, which can get pipeline, like zsh's
} builtin "repeat"?
You can't. "repeat" isn't a builtin, it's a keyword, part of the
language syntax, and the shell language doesn't provide a way to add
new language elements at that level. Even the zmodload system is
quite limited in what can be done in this regard.
Depending on exactly what you want to accomplish, you might be able
to use an alias to get close. What is it that myrepeat would do?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-31 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 10:53 zsh custom pipeline handler disarmer
2016-03-31 14:41 ` Bart Schaefer
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).