Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ newcsh(1) — Ultrix-32 3.1D RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

newcsh(1)

NAME

newcsh − enhanced interactive csh

SYNTAX

/usr/new/csh

DESCRIPTION

The newcsh command is a modified version of the standard csh() command.  While the newcsh command has all the functionality of the csh() command, enhancements include command and filename recognition, and command line edit capability.

Command and Filename Recognition

The newcsh command recognizes and completes user name aliases, commands (including builtin csh commands), and filenames.  To use this feature, do the following:

1.Type enough characters at the prompt to make your input to the system unique. 

2.Press the ESC key. 

If your input is unique, the Shell completes the input line.  If the input is not unique, the terminal signals you with a beep.  If you receive a beep, type CTRL/D for a list of options.  You can then type the additional characters that will make your text unique.  After you have provided more input, press the ESC key again. 

Command Line Editing

The newcsh command allows you to visually edit command lines using either a vi or emacs environment.  The vi interface is modal and supports a subset of vi commands.  The emacs interface is modeless and supports a subset of emacs commands.  See the OPTIONS section for a list of the available vi and emacs commands.

To set the editing environment, define the Shell environment variable CSHEDIT as vi or emacs. If the environment variable CSHEDIT is not defined, the newcsh command searches for your EDITOR environment variable.  When your EDITOR environment variable is set to vi, ex, edit, or ed, the newcsh command defaults to the vi command interface.  If your EDITOR environment is not set to any of the previously mentioned editors, the default is the emacs command interface.  Note that if neither the CSHEDIT or EDITOR environment variables are defined, the newcsh command defaults to the vi command interface.

The new history modifier (:v) allows you to pull commands from the history list to make them available for editing in visual edit mode.  The symbol :v tells the Shell that you want to enter visual edit mode.  For example, the following command line invokes edit mode for the previously typed cp command line:

!cp:v

When you press the ESC key as the first character on a command line, it is equivalent to typing the following:

!!:v

Thus, the previous example invokes edit mode for the last command you entered.

Another useful editing feature is scrolling through the history list.  After you have entered edit mode by typing either !command:v or the ESC key, you can use the up-arrow and down-arrow keys to scroll through the history list and you may edit any command line in that history list. 

When you are in edit mode, all control characters are displayed as a space character.  Additional control characters cannot be inserted.  Existing control characters are preserved. 

EDITING INTERFACE

The available vi commands follow:

hMove left one character. (r)

lMove right one character. (r)

0Move to the start of the line. 

$Move to the end of the line. 

wmove forward one word. (r)

bMove back one word. (r)

eMove to end of word. (r)

fxMove forward onto character. (r)

FxMove back onto character. (r)

txMove forward up to character. (r)

TxMove back up to character. (r)

%Move to matching bracket ({[]}). 

iInsert text before cursor. 

IInsert text at beginning of line. 

aAppend text after cursor. 

AAppend text at end of line. 

cChange text. (o)

CChange to end of line (eol). (c$)

<esc>End insertion. 

xDelete char under cursor. (r)

XDelete character before cursor. (r)

rReplace a character. (r)

~Change case of current character. (r)

dDelete text. (o)

DDelete to eol (d$). 

uUndo last change. 

UUndo all changes. 

.Repeat last text change command (r)

pPut text from previous delete after cursor (r). 

PPut text from previous delete before cursor (r). 

^L,^RRedraw command line. 

/wordSearch back through the history list for a command containing the specified word.  If the specified word is not delineated by white space in the history list, the search fails.  Typing ESCAPE or CTRL/C aborts this command. 

nRepeat last history search. 

<RETURN>End edit and execute command. 

^CQuit; no command executed. 

(r)A repeat count is accepted. 

(o)Works within a cursor motion object. 

The available emacs commands follow:

^@Set mark (keyword null). 

^AMove to beginning of line. 

^B,
Move backward a character.

^C
Exit command line edit; do not execute a command.

^D
Delete next character (to kill buffer).

^E
Move to end of line.

^F,
Move forward a character.

^G
Cancel partial command.

^H,DEL
Delete previous character (to kill buffer).

^K
Kill (delete) to end of line (to kill buffer).

^L
Redraw line display.

^R
Search reverse for a single character.

^S
Search forward for a single character.

^T
Transpose two characters before cursor.

^Un
Specifiy a repeat count before command (default of n is 4).

^W
Delete between cursor and mark (to kill buffer).

^Y
Yank from kill buffer.

CR,NL
End edit and execute command.

ESC-^C
End edit and execute command.

ESC-B
Move backward a word.

ESC-D
Delete next word.

ESC-F
Move forward a word.

ESC-H
Delete previous word.

ESC-DEL
Delete previous word.

ESC-n
Repeat count before command.

^X^C
End edit and execute command.

^Xu
Undo last change.

^XU
Undo all changes.

^X~
Change case of next character.

^X^Sword
Search back through the history list for a command containing a specified word.  If the specified word is not delineated by white space in the history list, the search fails.  Typing  ESCAPE or CTRL/C aborts this command. 

^X^S
Repeat last history search command.  You must be in search mode to issue this command.  Note that ^G cancels the previous search word so that you can enter a new word. 

FILES

/usr/new/csh

SEE ALSO

csh(1)

Commands

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026