Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can’t get Mercurial (hg) to use pico as my EDITOR when I’m using fish shell.

I’ve tried using this and other variations, but nothing seems to help:

set -U EDITOR pico

hg commit will always open vi as the editor, and I do not want that.

UPDATE: Adding setenv EDITOR pico to the file ~/.config/fish/ did what I wanted.

share|improve this question
Do you have VISUAL set? – grawity Jun 8 '12 at 9:02
thanks! setenv worked for me too when trying to set $BUNDLER_EDITOR – Milovan Zogovic Sep 28 '12 at 13:22
You should make your solution a proper answer and mark it as correct. – RazerM Oct 25 '13 at 17:53

2 Answers 2

This is the canonical way to do so

set -Ux EDITOR pico
  • U for universal variable
  • x to export it
share|improve this answer
pico is same as nano !!! – Ciasto piekarz Feb 15 at 11:36

You can also set a default editor just for git, which will ignore your default setup:

git config --global core.editor pico
share|improve this answer

Your Answer


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.