Jarred-Sumner / git-peek

git repo to local editor instantly
MIT License
716 stars 17 forks source link

Add configuration for default $EDITOR override #18

Closed morsdyce closed 3 years ago

morsdyce commented 3 years ago

I'd like to use WebStorm when running git peek, however my $EDITOR environment is set to vim and I'd prefer to keep it this way because I prefer working in the terminal when working with git for interactive rebases.

I know I currently can overcome this by writing git peek -e webstorm url however it would be nice if I could save a default editor once I set up git peek that I won't have to remember adding the flag each time

Jarred-Sumner commented 3 years ago

The good news is this is already implemented! See here: https://github.com/Jarred-Sumner/git-peek#private-repositories--choosing-an-editor

If you create a $HOME/.git-peek file with this:

EDITOR="webstorm"

It should work.

The file is a dotenv file. So if there are any other environment variables you want to change you can do that there too (e.g. GITHUB_TOKEN)