Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was learning bash command line shortcuts and such , when i came across the option to edit the command line in my editor.(Awesome!).

$set -o vi 
$echo test1 test2 test3 test4

I gave an ESC and then pressed v and it gave me this error.-bash: /usr/bin/pico: No such file or directory.The EDITOR variable in my .bashrc is /usr/bin/vim which exists and is working normally. But why is this looking for pico in the first place?

share|improve this question
2  
It might be using the editor named in the VISUAL variable. Try doing env | grep 'pico' that'll find out which variable is referring to pico. –  Dan D. Oct 15 '12 at 4:54
    
thats it.. will you post this as answer so that i can close this? –  MIkhail Oct 15 '12 at 5:03

1 Answer 1

up vote 2 down vote accepted

It might be using the editor named in the VISUAL variable as if set is used as the editor before the EDITOR is I think when the program sees that DISPLAY is set. Try doing env | grep 'pico' that'll find out which variable is referring to pico.

There are other variables which programs use to determine which editor to use. VISUAL is normally set to a graphical editor or a remote for one. While EDITOR is normally set to a console editor. If VISUAL is not set the programs instead use EDITOR.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.