2

I would like to specify the startup command to run on the :terminal shell. E.g. bash -c ls. The shell can be specified with set shell=bash, but how to specify the arguments? In another use case, I need to specify the shell used by WSL on Windows (wsl -e fish) with set shell=wsl (which currently opens bash by default).

2
  • Welcome to Vi and Vim! In general, :help :terminal contains lots of helpful details. You might also be interested in How to navigate :help
    – D. Ben Knoble
    Jan 17, 2021 at 17:09
  • you can check for $VIM_TERMINAL at the end of .bashrc and run the commands there
    – balki
    Oct 26, 2023 at 15:56

1 Answer 1

0

It can be done with :terminal $SHELL $CUSTOM $ARGS.

1
  • 1
    I believe you can also do :terminal ++shell {args}
    – D. Ben Knoble
    Jan 17, 2021 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.