airblade / vim-gitgutter

A Vim plugin which shows git diff markers in the sign column and stages/previews/undoes hunks and partial hunks.
MIT License
8.34k stars 296 forks source link

Don't change shell option #847

Closed tracyone closed 1 year ago

tracyone commented 1 year ago

hi,

first, I would like to thank you for your work on this plugin.

second, I found shell option was changed by vim-gitgutter.

My default setting of shell is zsh, I use built-in terminal feature of vim, I want to open terminal using shell option.

https://github.com/airblade/vim-gitgutter/blob/f19b6203191d69de955d91467a5707959572119b/autoload/gitgutter/utility.vim#L195-L197

airblade commented 1 year ago

The plugin only changes 'shell' for some of the commands it runs and even then only when running synchronously, which is not the default. It always changes the value back again afterwards.

https://github.com/airblade/vim-gitgutter/blob/f19b6203191d69de955d91467a5707959572119b/autoload/gitgutter/utility.vim#L94-L96

So it should not affect your use of the built-in terminal. If it does, it's a bug – in which case please give me further details such as how to reproduce the problem.

The plugin uses a known 'shell' value so that its external commands are guaranteed to work. Originally it used whatever value the user had it set to, and that led to compatibility problems across all the different kinds of shells people use.

airblade commented 1 year ago

So it should not affect your use of the built-in terminal. If it does, it's a bug – in which case please give me further details such as how to reproduce the problem.

Closing this because I haven't heard any more details. Let me know if it's still a problem!