zsh-users
 help / color / mirror / code / Atom feed
* prompting
@ 2003-07-26  0:17 Skye Poier
  2003-07-26  0:30 ` prompting Philippe Troin
  0 siblings, 1 reply; 2+ messages in thread
From: Skye Poier @ 2003-07-26  0:17 UTC (permalink / raw)
  To: zsh-users

Second zsh question..
What would be [a|the best] way to do a y/n prompt in a zsh function?
Single keypress would be best of course, but y<cr> is ok too

print -n "Are you sure you want to do that? [y/n] "
then??

Thanks!
Skye


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: prompting
  2003-07-26  0:17 prompting Skye Poier
@ 2003-07-26  0:30 ` Philippe Troin
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Troin @ 2003-07-26  0:30 UTC (permalink / raw)
  To: Skye Poier; +Cc: zsh-users

Skye Poier <skye@isilon.com> writes:

> Second zsh question..
> What would be [a|the best] way to do a y/n prompt in a zsh function?
> Single keypress would be best of course, but y<cr> is ok too
> 
> print -n "Are you sure you want to do that? [y/n] "
> then??

read -q ?

Phil.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-26  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-26  0:17 prompting Skye Poier
2003-07-26  0:30 ` prompting Philippe Troin

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).