input
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | input [2006/09/01 18:32] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Synopsis: | ||
+ | __input__ | ||
+ | __input_char__ "< | ||
+ | |||
+ | ======Description: | ||
+ | This command is primarily for use inside scripts. | ||
+ | to present the user with a visible prompt for specific commands. | ||
+ | can be used for interactive commands, for command confirmation, | ||
+ | Multiple commands may be specified if surrounded with curly braces. | ||
+ | |||
+ | The variant __INPUT_CHAR__ words the same as __INPUT__, except it only takes a | ||
+ | single character. | ||
+ | that a carriage return be entered before executing the command; the first | ||
+ | keystroke will trigger it. | ||
+ | |||
+ | ======Options: | ||
+ | |-noecho | ||
+ | |||
+ | ======Examples: | ||
+ | To let a command ask for confirmation: | ||
+ | input "Are you REALLY sure you want to do this? (y/n) " { | ||
+ | if ( [$0] == [y] ) exec rm -rf * | ||
+ | } | ||
+ | |||
+ | The basis for a simple paging mechanism: | ||
+ | input_char "Press ' | ||
+ | | ||
+ | /* do whatever */ | ||
+ | } | ||
+ | } | ||
+ | |||
+ | ======Aliases: | ||
+ | These commands are functionally equivalent to the $" | ||
+ | truth, they supersede $" | ||
input.txt · Last modified: 2006/09/01 18:32 by 127.0.0.1