Next: , Previous: , Up: Reference   [Contents][Index]

3.3 The Input Line

The bottom line of the screen is usually occupied by the status bar (see The Status Bar). However, whenever ne prompts you for a command or file name or asks you to confirm some action, the bottom line becomes the input line. You can see this because a prompt is displayed at the start of the line, suggesting what kind of input is required. (Prompts always ends with a colon, so it is easy to distinguish them from error messages, which overwrite the status bar from time to time.)

ne uses the input line in two essentially different ways: immediate input and long input. You can easily distinguish between these two modes because in immediate input mode the cursor is not on the input line, while for long input mode it is.

Immediate input is used whenever ne needs you to specify a simple choice that can be expressed by one character (for example, ‘y’ or ‘n’). When you type the character, ne will immediately accept and use your input. Most immediate inputs display a character just after the prompt. This character is the default response, which is used if you just press the Return key. Note that immediate input is not case sensitive. Moreover, if a yes/no choice is requested, anything other than ‘y’ will be considered a negative response.

Long input is used when a whole string is required. You can enter and edit your response to long inputs like a line of text in a document. Most key bindings related to line editing work on the command line exactly as they do in a document. This is true even of custom key bindings. Just edit as you are used to. Moreover, the you can paste the first line of the current clip using the keystroke that is bound to the Paste command, usually Control-V. If your long input is longer than the screen width, the input line scrolls to accommodate your text so you can input very long lines even on small monitors. (There is a limit of 2048 characters.)

The default response to a long input is the response you gave to the previous long input. Your first action when presented with a long input will either erase the default response or allow you to edit it. If the first thing you type is a printing character, the default response will be erased. Anything else (cursor movement for example) will allow you to edit it further.

Long input also lets you access your previous long input responses with the up and down cursor commands (or with wider movement commands, such as start/end of file, page up/down, etc.). Once you find a previous input you like, you can edit it further. Long input history is not document specific, so you can recall any of your inputs regardless of which document was active when you entered it. Furthermore, ne saves the most recent long inputs in ~/.ne/.history when you end your ne session and loads them again when you begin another ne session.

When asked to input a number, you can choose between decimal, octal and hexadecimal notation in the standard way: a number starting with ‘0’ is considered in octal, a number starting with ‘0x’ is considered in hexadecimal, and in all other cases decimal base is assumed.

Whenever a file name is requested, you can type a partial file name and complete it with the Tab key. ne will scan the current directory (or the directory that you partially specified) and search for the files matching your partial suggestion. The longest prefix common to all such files will be copied on the input line (ne will beep if no completion exists). It’s easier done than said—just try. If you press Tab again, you will be brought into the file requester: only the files and directories matching your partial specification will appear, and as usual you will be able to navigate and select a file or escape. See The Requester. Note that ne considers the last word on the input line the partial file name to complete, no matter where the cursor is currently (you must use quotes if the name contains spaces, even if it is the only item on the input line).

Complete long input with the Return key. You can cancel a long input using f1, Escape, Escape-Escape or any key that is bound to the Escape command. The effect will vary depending on what your were requested to input, but the execution of the command requiring the input will stop.

Next: , Previous: , Up: Reference   [Contents][Index]