6

In neovim, when use the command :term, it opens a new shell with bash. I want to use zsh by default.

zsh is already my default shell. I changed it with chsh.

0
8

Looking at :h :terminal it says

Execute {cmd} with 'shell' in a new terminal buffer

So use :set shell=/path/to/zsh. Put it in your vimrc file (probably init.vim) to make it "permanent".

3
  • I keep getting An unknown element "" was received.. Are there other settings that should go with this? – FilBot3 Jan 16 '20 at 19:07
  • What's emitting that? Vim? Zsh? I've never seen that message before. If you don't have any more information I suggest you swap out your vimrc for a bare bones version with not much more than the set shell=... line and see what happens. And running vim with -V will tell you what's going on during startup. – B Layer Jan 17 '20 at 6:37
  • I have been having this issue as well, and it's a couple of plugins that are emitting the message (vim-plug and ctrlp.vim so far). It seems to have something to do with using powershell. github.com/PowerShell/PowerShell/blob/master/src/… Removing the "set shell" directive from my vimrc stops them from occurring. Still haven't figured out what's going on. – RageCage Jan 18 at 22:07

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.