Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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? – woodstok Oct 15 '12 at 5:03
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .