I have a chunk of code in my .bashrc, everytime one runs the shell (I usually use konsole) a switch case appears giving options of which branch or trunk to use. Example:
1) V0230
2) V0300
3) Dev
Enter Option: __
$PROJECT_HOME and others variables are set upon the choise made.
The annoying thing in this is that it appears everytime I open a new tab the same screen is printed. But yet I want to open a new konsole and use a different branch, so, simple export a variabe can not be the solution
Must have a way to run this code only when a konsole new screen is open. Maybe making alias konsole=konsole --run <desired-function>
. The konsole's documentation doesn't give a help, theres not even a man konsole
just konsole --help
.
Just create an alias:
and in your
.bashrc
:and use konsole or konsole_select_branch whether you want to choose a branch or just open a tab or window.