just using 'r' does not work under csh, or at least under AIX and Solaris it doesn't.
glj -
If you need to use csh but want the command line completion and the functionality of using arrow keys to scroll through command history, have you considered 'tcsh'? This should give you the best of both worlds.
If you're a VI user, you can use VI line-edit mode on the comand line. To set this up, type:
$ set -o vi
Now you can use standard VI commands to browse the command history, and edit the command (for example, ESC-k to go to the last command, / to search through the command history etc).
This definately works in korn, not so sure about the other shells
To add to Ranazar's post, set -o emacs will put you into the emacs mode of line editing.
ctrl-p = up or previous command.
ctrl-k = down or next command.
esc-esc = filename completion
The great thing about emacs is that you can edit and use the backspace without having to switch between the "vi command/insert" modes.
the command "r" is an alias for "fc -e -". similarly, the "history" command is an alias for "fc -l". i specified my own alias "re" which is "fc -s" so i can type "re 123" to redo command #123, as seen in the fc -l output. the fc man page explains a lot but i still don't understand how "fc -e -" works.
i also use "set -o vi" but i use ViM as my line editor. works great with the syntax highlighting. i "ESC-k" to my command, then press "v" and get a full screen ViM session. you will want to set the variables FCEDIT, EDITOR, and VISUAL to /usr/local/bin/vim or where-ever.
i forgot my favorite part, though. press ESC then / then your regular expression to find a matching command. so i can type "ESC /apac ENTER" and find the last time i typed out the long, ugly path to my HTML doc directory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.