# Drop in to fish shell if: # 1. Parent shell is not fish and shell level == 1 # OR parent shell is tmux # 2. Not executing a bash command, e.g. 'bash -c' parent_name=$(ps --no-header --pid=$PPID --format=comm) if [[ (($parent_name != "fish" && $SHLVL == 1) || ($parent_name == "tmux: server")) && -z ${BASH_EXECUTION_STRING} ]] then shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION='' exec fish $LOGIN_OPTION fi