I want to make an alias for fixing my previous commands easily.

Using alias fix="fc -e nano" works, but I'd love to use sublime text with this. However, using fc -e subl only brings a blank editor.

I understand that nano only opens up /tmp/bash-fc.PUKKW8. I can force sublime text to open this file manually, but can't figure out a way to open it through fc. Is there a way to do this?

1 Answer 1


set the FCEDIT variable:

FCEDIT="subl -w"

Add it in your ~/.bashrc to enable autostart.

  • This has the same effect as fc -e subl. I think this is due to the fact that subl starts in the background.
    – a3y3
    Mar 11, 2020 at 17:52
  • 1
    Fixed it! I will accept your answer if you change it to fc -e "subl -w"!
    – a3y3
    Mar 11, 2020 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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