How use vi as the command-line editor in the shell
-
I am a brand-new user of pfSense, with 2 questions ;-)
1- Has anyone here figured out how use vi as the command-line editor in the shell?
2 - Would you be willing to share how to set it up with me?When I use other version of Unix and Linux, I just go to the .bash_profile and type this:
set -o viAfter logging off, and then back on, I can repeat any of my last commands with <Esc> k
Then I can search through all past commands by using the vi search character /
Right now, I am getting by using the up-arrow to repeat commands, but I do miss the vi command-line editor.
-
It's
tcsh
for some historical reason.https://www.freebsd.org/cgi/man.cgi?tcsh(1)
Try adding
bindkey -v
to the end of/root/.tcshrc
-
RE: Try adding bindkey -v to the end of /root/.tcshrc
That worked! Thanks a million! Now, I'm happy as a clam.
-
Oh, my elation was short-lived. It turns out that the .tcshrc file in /root is overwritten by a default file elsewhere. My quest is now to find that default file and fix it to my liking.
-
Try changing
/etc/skel/dot.tcshrc
You will probably have to re-do this after an upgrade or reinstall or etc.
-
You are too quick for me! Yes, I found it while searching on my own. That did it. I also added the .history file, so the history of keystrokes will span as many days and weeks as I need.
Thanks for your help, Sir Derelict!
-