Table of Contents

Synopsis:

input_char [-noecho] “<prompt>” {<stuff>}

Description:

This command prompts the user to type ONE character and then runs the <stuff> and $* will be the user's response.

The -noecho option will suppress the outputting of the character to the input line as it is typed.

The $'…' expando is a wrapper around INPUT_CHAR in case you were wondering. It's always better to use INPUT_CHAR than $'…' if you can arrange it because it operates asynchronously, which means it plays nicely with other commands.

Examples:

    input_char "Press 'q' to quit, any other key to continue: " {
       unless ( [$0] == [q] ) {
          /* do whatever */
       }
    }

History:

The INPUT_CHAR command first appeared in EPIC3.003.