1

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

2

set the FCEDIT variable:

FCEDIT="subl -w"
fc

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

2
  • 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

You must log in to answer this question.

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