Xsession (and hence ~/.xsession) is executed in bash but does not set
SHELL to the full path to bash. In case the user's login shell is
something other than bash then SHELL is set to that shell. Keychain
inspects the SHELL variable to find out what shell it has to generate
code for, so in .xsession it generates code for the user's login shell
instead for bash.
This change forces SHELL to bash for keychain when invoked from
.xsession, the same way it's done when generating keychain's code for
bash integration.
Closes#3693
bash and zsh apparently handle command substitution slightly differently
than fish. in bash/zsh:
$ export FOO=x
$ FOO=y echo $(sh -c 'echo $FOO')
x
whereas in fish:
$ export FOO=x
$ FOO=y echo $(sh -c 'echo $FOO')
y
so we have to assign $SHELL within the substitution for bash and zsh.