zbirenbaum / nvterm

NvChad's Official Terminal Plugin ( Unmaintained but still usable and stable), wait for v3.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Request] Add option to change shell for nvterm

FROST8ytes opened this issue · comments

It would be nice if we could set a default shell being used by nvterm in the config file. For example, my default shell is bash but I would like for nvterm to use fish automatically. Is this possible without using chsh to change the whole user's default shell? If not, how would I achieve similar result of using chsh on Windows?

technically this was already possible since the shell was read from vim.o.shell, but I exposed it in the config just now under terminals.shell

It seems like :set shell break nvterm but not NeoVim's default terminal.

terminal-issue.mp4

This was because by default, nvterm reads the shell option from the config which is set to vim.o.shell during initialization unless otherwise specified. I removed the shell option from the config defaults, so that if it is undefined vim.o.shell will be respected at runtime, but if the user specifies a shell in their config it should default to that.

I also added an override flag to nvterm.new for the shell which has the highest priority.