xt
is a custom csh/tcsh alias to open shells with specific window colors. It issues the following command:
xterm -geometry 105x25 -font 8x13 -bc -bg #333 -fg #999 \!* &
How could one command be written to open a new shell with a color based on the level the shell is in a stack.
Example:
- %> xt
Open shell A (white bg/black fg) - new shell - %> xt
Open shell A.a (black bg/grey fg) - child shell - %> xt
Open shell A.a.a (green bg/yellow fg) - grandchild shell
While this is for csh/tcsh, bash answers are also acceptable if it’s easier/simpler there. As stated, I would like one command/alias to open the parent and child shells and decide what color to use.