PreviousNext

Command Line Editing

You can edit a line before it is sent to dcecp by typing certain control characters and escape sequences. To enter a control character, hold down the <Ctrl> key while pressing the appropriate character key. To enter an escape sequence, press the <Esc> key followed by one or more character keys. The escape sequences are case-sensitive; the control characters are not.

You can enter an editing command anywhere on a line. In addition, you can press the <Return> key anywhere on the line.

You can specify a number [n] as a repeat count. To enter a repeat count, press the <Esc> key, a number, and the command you want to execute.

For example, <ESC 4> <Ctrl-D> deletes the next four characters on a line.

Use the control characters and escape sequences shown in the following tables for line editing.

Control Character Action Performed
C-A Move to the beginning of the line
C-B Move left (backwards) [n]
C-D Delete character [n]
C-E Move to the end of the line
C-F Move right (forward) [n]
C-G Ring bell
C-H Delete character before the cursor [n]
C-I Complete the file name (<Tab> key)
C-J Done with line (<Return> key)
C-K Kill to the end of the line (or column [n]
C-L Redisplay line
C-M Done with line (alternate <Return> key)
C-N Get next line from history [n]
C-P Get previous line from history [n]
C-R Search backward (or forward if [n]) through history for text; start line if text begins with an up-arrow
C-T Transpose characters
C-V Insert next character even if it an edit command
C-W Wipe to the mark
C-XC-X Exchange current location and mark
C-Y Yank back last killed test
C-[ Start an escape sequence (<Esc> key)
C-]c Move forward to next character c
C-? Delete character before the cursor [n]
Escape Sequence Action Performed
ESC C-H Delete previous word (<Backspace> key) [n]
ESC DEL Delete previous word (<Delete> key) [n]
ESC SPC Set the mark (<Space Bar>); refer to C-XC-X and C-Y control characters in the previous table.
ESC . Get the last (or [n]th) word from the previous line
ESC ? Show possible completions
ESC < Move to the start of history
ESC > Move to the end of history
ESC b Move backward one word [n]
ESC d Delete the word under the cursor [n]
ESC f Move forward one word [n]
ESC l Make the word lowercase [n]
ESC u Make the word uppercase [n]
ESC y Yank back the last killed text
ESC w Make area up to mark yankable
ESC nn Set repeat count to the number nn
The DCE control program also supports file name completion. For example, suppose the root directory has the following files in it:

vmunix

core

vmunix.old

If you type rm /v and then press <Tab>, dcecp finishes as much of the name as possible by adding munix. If the name is not unique, the terminal presents a beep tone. If you enter <Esc ?>, dcecp displays the two possible complete file names: vmunix and vmunix.old. If you respond by entering a period (.) and by entering <Tab>, dcecp completes the file name for you.