Command line editing is available under Unix. There are two primary shells which you can use for GCG: C-Shell (csh and it's enhanced version, tcsh) and Korn shell (ksh). Both of these shells have command line editing capabilities. GCG will run under either Korn Shell or under C-shell. Most of you at the onset will have tcsh (a C-shell superset) as your default shell. In order to change, you will need to send email to Stuart Brown
Editing Commands.
If you are using tcsh (T-C-shell), then command line editing is built-in and you can simply use it.
If you are using Korn shell (ksh), your login file (.profile) must contain the line
set -o emacs
before command line editing will work. You can also type this at the command prompt. This step is not necessary if your default shell is tcsh
Specific Editing Commands:
Previous command: ^P
Next command: ^N
Back 1 character: ^B
Forward 1 character: ^F
Delete 1 character: ^D (NOTE: if you are not editing a command, ^D will log you out.)
Execute the retyped command: <ENTER> key
Depending on the telnet program (terminal emulator) you are using, the cursor control keys on your keyboard may work. Try it and see. If so, then you only need remember how to delete a character.
'Broken' Delete Key
If the DELETE key produces unexpected results, there is a way to correct this. If you type ^C (control-C) to abort the current command line, and then carefully type:
stty erase [^H]
where [^H] represents your pressing the key that you want to be a backspace/delete key, and then press the ENTER key, then you will have reset the backspace/delete key for your current session. You can also use and editor (pico, emacs, or vi) to put this in your .login or .profile file and it will be set every time you login.
File name completion:
Hitting the escape key twice after you have typed enough characters of a file name to make it unique will enable the file-name completion feature of ksh, and the shell will fill in the remainder of the file name for you.