I have written a series of python tools that spawn new bash sessions. I am want those individual subshells to inherit the command history of the parent. I have tried:
shopt -s histappend
PROMPT_COMMAND="history -an;$PROMPT_COMMAND"
in the .bash_profile
. But it didn't give me what I need. I have seen this done. My tool uses:
os.system('bash')
to spawn a subprocess.
Thoughts? better way?