Terminal Subshell Prompt

Technical issues/questions of an intermediate or advanced nature.
Post Reply
Bogomips
Full of knowledge
Full of knowledge
Posts: 2522
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Terminal Subshell Prompt

Post#1 by Bogomips » 13 Oct 2016, 11:59

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
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

port
Samurai
Samurai
Posts: 132
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Re: Terminal Subshell Prompt

Post#2 by port » 18 Oct 2016, 00:07

sorry but what's the purpose your are pursuing?

Post Reply