Closed itay-grudev closed 6 years ago
You're already doing it correctly, but the default hard-coded value in the settings overrides this: https://github.com/lirios/terminal/blob/bd46c117b647faeeb23009571077376bf23b4b92/imports/terminal/ksession.cpp#L72-L74
So it might be better to leave it empty in the default settings and make sure the defaults from the Konsole session are used:
The code in ksession.cpp that you pasted sets the default shell to whatever $SHELL is or, if it's empty, to /bin/bash. Then later, after the initial session creation, the shell program is changed to whatever is configured in the settings.
The configured shell program is then used for new tabs and windows. Terminal can't change the shell program currently in use in the existing tabs: it would have to kill the current shell process and start a new one loosing your work.
Right now if you leave the shell-program
param empty, the app becomes unusable. Yet if you simply put $SHELL
it works ok. So I propose two changes:
shell-program
param is not set (empty).$SHELL
or leave it empty.That should be relatively easy to do.
Got it, I didn't test with shell-program
empty.
The logic in ksession.cpp
should be moved to the shell program setter so that $SHELL
is used instead of an empty string.
If you don't want to bother checking the default shell and running it, how about simply changing the default shell command setting to: