https://stackoverflow.com/questions/4511407/how-do-i-know-if-im-running-a-nested-shell/4511483#4511483