Skip to content

Instantly share code, notes, and snippets.

@colomon
Created December 14, 2011 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colomon/1474897 to your computer and use it in GitHub Desktop.
Save colomon/1474897 to your computer and use it in GitHub Desktop.
multi sub prompt (
$prompt_str?,
# :a( :$args ) of Bool,
# :c( :$complete ) of Array|Hash|Str,
:d(:$default) of Str,
#--> :D(:$DEFAULT) of Str,
# :e( :$echo ) of Str,
:f(:$fail) of Bool = sub{False},
:$in of IO = $*IN,
# :g( :$guarantee ) of Hash = hash{},
# :h( :$history ) of Str,
:i(:$integer) of Bool,
# :k( :$keyletters ) of Bool,
# :l( :$line ) of Bool,
#--> :$menu of Any,
:$must of Hash = hash{},
:n(:$number) of Bool,
:$out of IO = $*OUT,
:p(:$prompt) of Str is copy,
# :r( :$return ) of Str,
# :$stdio of Bool,
# :s( :$single ) of Bool,
# :t( :$timeout ) of Bool,
:v(:$verbatim) of Bool,
:w(:$wipe) of Bool,
:wf(:$wipefirst) of Bool,
:y(:$yes) of Bool,
:yn(:$yesno) of Bool,
:Y(:$Yes) of Bool,
:YN(:$YesNo) of Bool,
*%unexpected_options,
*@prompt,
) {
say "sigh"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment