Page 1 of 1

Terminal Subshell Prompt

Posted: 13 Oct 2016, 11:59
by Bogomips
Getting Subshell Status reflected in Terminal Prompt.

At the moment the only way of telling this is thru Process Id of Current Shell:

Code: Select all

guest@porteus:~$ echo PID of Shell: $$
PID of Shell: 2484
guest@porteus:~$ sh
guest@porteus:~$ echo PID of Shell: $$
PID of Shell: 2506
guest@porteus:~$ bash
guest@porteus:~$ echo PID of Shell: $$
PID of Shell: 2516
guest@porteus:~$ exit
guest@porteus:~$ echo PID of Shell: $$
PID of Shell: 2506
guest@porteus:~$ exit
guest@porteus:~$ echo PID of Shell: $$
PID of Shell: 2484
While back in 3.1

Code: Select all

guest@porteus:~/pk01$ sh
sh-4.2$ . ../p10/Por/Komodo/funcs.sh

Re: Terminal Subshell Prompt

Posted: 18 Oct 2016, 00:07
by port
sorry but what's the purpose your are pursuing?