Skip to content

Instantly share code, notes, and snippets.

@monking
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monking/3879a5711abe9b77e11f to your computer and use it in GitHub Desktop.
Save monking/3879a5711abe9b77e11f to your computer and use it in GitHub Desktop.
.subshell_aliases
alias ss='PARENT_SHELL=$PARENT_SHELL:$$ $SHELL'
alias ssi='PARENT_SHELL_ARRAY=(${PARENT_SHELL//:/ });echo ${PARENT_SHELL_ARRAY[@]}, ${#PARENT_SHELL_ARRAY[@]} deep'
alias ssk='[[ -n $PARENT_SHELL ]] && exit || echo "You'\''re not in a subshell"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment