My vimrc sets the shell option:
let &shell='/bin/bash -i'
which I confirm using
echo &shell
The -i
makes the shell interactive. I want to do this so that it runs ~/.bashrc
, which contains the setting
shopt -s extglob
However, extglob
was not being set because ~/.bashrc
was not being run, which in turn seems to be because the shell is not interactive. I determined this by putting the vim cursor on each the following lines
echo $-
echo $PS1
and issuing the normal mode command !!bash
. According to the Bash manual, the string returned by the first command should include the letter i
if the shell is interactive, while the string returned by the second command should include the text and control characters for the prompt that is shown at the bash command line (as opposed to nothing). Both tests show the shell to be not interactive.
Why would the -i
flag in the shell option be ignored? What further troubleshooting steps can I take?