vi shell commands?

mkwan

Tech
today at work, my boss was teaching me the linux OS system. He showed me the bash shell commands I probably will need for the technical support. Somehow the shell had some of "vi commands" flavor and he said something about 'shell history commands'....

my question is can I add some 'vi commands' flavor onto the bash shell in terminal on panther? and if so, how would i do that?

thanks

mkwan
 
can you be a bit more specific though?

i dont have experience with what you are talking about but there are "history commands" . my guess is that if you google around you'll find something. sorry i can't be more helpful.
 
this question is related to my previous question attempts...

has anyone heard of editor commands in shell prompts?

for example, when I do this command:

set -o vi (works in bash shell apparently)

after that command, I am able to edit the previous shell commands using the vi editor commands

how do I set this permanently whenever I startup terminal?

I hope this question is clear

thanks

mkwan
 
Simply put the set -o vi command at the end of your .bashrc file in your home directory.
 
I know what you're talking about -- I work in HPUX regularly, and I have many vi-style command-history commands. I don't actually know how it's set up though; our administrator sets that up for us by default.

However, in OSX Terminal they would be kind of redundant -- Terminal lets you scroll back through your command history with the up & down arrows, and edit your current command line with left & right arrows. I would LOVE to have that same capability in HPUX, but I gotta do things like esc-K and esc-J for history... $ for end of line... etc. ;-)
 
As far as I know, bash is the default (with vi-like edit commands) in Terminal as long as work with X.3 and you installed X.3 from scratch.
If you updated to X.3 from X.2, then your default is tcsh (remaining for X.2 so that all your settings remain)
 
I think by default vi has emacs-like edit commands, but you can set that to vi if you want
 
Back
Top