Is it possible to use another shell for scripts than for standard terminal use?
The problem is, i use fish as shell at the moment and i find i very convenient. But i would like to learn a bit of shell programming in Ubuntu. Since there are differences between those two it would be nice, to work with fish and bash at the same time, perhaps in different terminal windows? i know i can write a shell script and have to put the interpreter in the beginning. But for testing developing at commandline i would find it useful to fast switch between shells or use two different terminal windows with different shells in one session at the same time?
3 Answers
Yes, like takkat said you can start gnome-terminal, or xterm, or konsole in kde or press Ctrl+Alt+F1 or Ctrl+Alt+F2 or Ctrl+Alt+F3, etc.. All by default use bash but you can have fish opened along side with them as well.
To have any of the 2 do this:
gnome-terminal -e bash (To start gnome-terminal with bash)gnome-terminal -e fish (To start gnome-terminal with fish)
You can switch to any installed shell by running it at the command line. This applies to bash, ksh, ash, dash, fish, csh, etc. These will inherit the login environment from the original shell.
Starting an interactive session as a login session will use the shell from your login. You need to change your shell between starting sessions if you want different login sessions.
For your purposes, I would just open an a second window and replacing the shell with the command exec /bin/bash -i.
You can easily start two terminal windows by typing
gnome-terminalin your fish shell.
In case you changed your standard shell to 'fish' proceed as CYREX suggested.
3