Special Command Line Characters

Commands entered at the IDL prompt are usually interpreted as IDL statements to be executed. Other interpretations include executive commands that control execution and compilation of programs, shell commands, and so on. Input to the IDL prompt is interpreted according to the first character of the line, as shown in the following table.

Note
The information in this section applies equally to IDL used in command-line mode or in the IDL Workbench.

Table 2-2: Interpretation of the First Character in an IDL Command 

First Character
Action
.

Executive command. See About Executive Commands for details.

?

Help inquiry. For example, enter ? on the Command Line to open the online help system. Enter ? .RUN to open the Help system to the page that explains the .RUN command.

$

Send an operating system commands to a subprocess.

Note - the SPAWN procedure is a more flexible alternative. It need not be used interactively and the standard output of the command can be saved in an IDL string array. See "SPAWN" (IDL Reference Guide) for details.

@

Batch file initiation.

↑ or ↓ key

Recall / edit previous commands.

Ctrl+D

In UNIX command-line mode, exits IDL, closes all files, and returns to operating system.

Ctrl+Z

In UNIX command-line mode, suspends IDL.

All others

IDL statement.

About Executive Commands

IDL executive commands compile programs, continue stopped programs, and start previously compiled programs. All of these commands begin with a period and must be entered in response to the IDL prompt. Commands can be entered in either uppercase or lowercase and can be abbreviated. Under UNIX, filenames are case sensitive; under Microsoft Windows, filenames can be specified in any case. See "Executive Commands" (IDL Quick Reference) for a descriptions of the available executive commands.

Note
Comments (prefaced by the semicolon character in IDL code) are not allowed within executive commands.

Executive commands are used to create $MAIN$ programs. See Creating $MAIN$ Programs for details.

Special Command Line Key Combination

When working at the command line, key combinations can be used to quickly edit a command. The line-editing abilities and the keys that activate them differ somewhat between the different operating systems. To access the history of commands entered at the command line, see Recalling Commands.

Note
The behavior can also differ within the same operating system, between the terminal window-based command line version of IDL and the Command Line view in the IDL Workbench.

The table below lists the edit functions and the corresponding keys in the terminal window (Command Line) and Workbench versions of IDL.

Table 2-3: Command Recall and Line Editing Keys 

Function
IDL Command Line
IDL Workbench

Move cursor to start of line

Ctrl+A or Home

Ctrl+A or Home

Move cursor to end of line

Ctrl+E or End

Ctrl+A or Home

Move cursor left one character

Left arrow

Left arrow

Move cursor right one character

Right arrow

Right arrow

Move cursor left one word

Ctrl+B,
(R13 on Sun Keyboard)

Ctrl+left arrow

Move cursor right one word

Ctrl+F,
(R15 on Sun Keyboard)

Ctrl+right arrow

Delete from current to start of line

Ctrl+U

Ctrl+U

Delete from current to end of line

Ctrl+K

Ctrl+K

Delete current character

Ctrl+X or Ctrl+D

Ctrl+X or Delete

Delete previous character

Ctrl+H, or Backspace, or Delete

Backspace

Delete previous word

Ctrl+W, or Esc-Delete

Generate IDL keyboard
interrupt

Ctrl+C

Ctrl+C
(when a program is running)

Move back one line in
recall buffer

Ctrl+N, Up arrow

Up arrow

Move forward one line in
recall buffer

Down arrow

Down arrow

Redraw current line

Ctrl+R

Overstrike/Insert

Esc-I

EOF if current line is
empty, else EOL

Ctrl+D

Search recall buffer for text

Available only in command-line mode. Enter ^ , then input search string at prompt.

Tab command matching

Available only for Windows.

After entering a few characters, press Tab to cycle through all the matching commands in the command history.

After typing a few characters, press Tab to cycle through all the matching commands in the command history.

Insert the character at the current
Executive Commands position

any character

any character

Parenthesis matching

Place cursor outside of parenthesis and IDL highlights the matching parenthesis.