2

I just upgraded to a new company computer (cloned existing machine) with macOS Mojave 10.14.5 and was shocked to see that my Terminal continues to lag when changing directories (takes about 5 seconds and terminal is frozen during this time period). I thought it was a problem with my 2013 MBP.

I have spent at least 5 hours looking around for answers and trying different things, but nothing is helping. I've freed up space on the Mac, disabled transparency for Terminal background, reset the Terminal profile back to default (Basic), migrated to a brand new machine.

For example: A simple cd Documents takes a long time

I'm looking for any suggestions.

Update: .bash_profile:

# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH

# Setting PATH for Python 2.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

[ -r "$HOME/.smartcd_config" ] && ( [ -n $BASH_VERSION ] || [ -n $ZSH_VERSION ] ) && source ~/.smartcd_config

export ANDROID_HOME=/Users/nick.moore/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform_tools
export PATH=$PATH:$ANDROID_HOME/tools
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH

Update: set -x output:

Nick-Moores-MBPr:Documents nick.moore$ cd Automation
+ cd Automation
+ smartcd cd Automation
+ [[ ! -t 1 ]]
+ local command=cd
+ [[ 2 == \2 ]]
+ [[ cd Automation == \c\d\ \. ]]
+ local 'usage=Usage: smartcd (edit|append|show|delete|filename|helper|template|setup|config|export|import)
[args]'
+ case $command in
+ shift
+ _smartcd cd Automation
+ [[ -n '' ]]
+ unset smartcd_last_run_mainline
+ unset smartcd_run_mainline
++ _smartcd_base
++ [[ -n '' ]]
++ echo /Users/nick.moore/.smartcd
+ local base=/Users/nick.moore/.smartcd
+ local 'action=builtin cd'
+ shift
+ local wherenow=/Users/nick.moore/Documents
+ local wherestarted=/Users/nick.moore/Documents
+ [[ -z /Users/nick.moore/Documents ]]
+ local run_from_smartcd=1
+ local _ashift_return
+ local _apop_return
++ fn_exists apush
+++ declare -f apush
++ [[ -n apush ()  { 
    local var=$1;
    shift;
    if [[ -n $var ]]; then
        if [[ -n $ZSH_VERSION ]]; then
            eval "$var=(\${$var[@]} \"\$@\")";
        else
            eval "$var=(\"\${$var[@]}\" \"\$@\")";
        fi;
    fi } ]]
++ echo 1
+ [[ -z 1 ]]
+ [[ -n '' ]]
+ local cd_flags=
+ local '_old_ifs=   '
+ IFS='      '
+ [[ -z '' ]]
+ [[ -n Automation ]]
+ [[ -n '' ]]
+ builtin cd Automation
+ local rv=0
+ IFS='      '
+ ((  0 != 0  ))
+ local whereto=/Users/nick.moore/Documents/Automation
+ _smartcd_last_run_for=x/Users/nick.moore/Documents/Automation
+ [[ -n '' ]]
+ unset leave_stack
+ [[ -n /Users/nick.moore/Documents ]]
+ apush leave_stack /Users/nick.moore/Documents
+ local var=leave_stack
+ shift
+ [[ -n leave_stack ]]
+ [[ -n '' ]]
+ eval 'leave_stack=("${leave_stack[@]}" "$@")'
++ leave_stack=("${leave_stack[@]}" "$@")
+ wherenow=/Users/nick.moore
+ [[ -n /Users/nick.moore ]]
+ apush leave_stack /Users/nick.moore
+ local var=leave_stack
+ shift
+ [[ -n leave_stack ]]
+ [[ -n '' ]]
+ eval 'leave_stack=("${leave_stack[@]}" "$@")'
++ leave_stack=("${leave_stack[@]}" "$@")
+ wherenow=/Users
+ [[ -n /Users ]]
+ apush leave_stack /Users
+ local var=leave_stack
+ shift
+ [[ -n leave_stack ]]
+ [[ -n '' ]]
+ eval 'leave_stack=("${leave_stack[@]}" "$@")'
++ leave_stack=("${leave_stack[@]}" "$@")
+ wherenow=
+ [[ -n '' ]]
+ [[ -z '' ]]
+ apush leave_stack /
+ local var=leave_stack
+ shift
+ [[ -n leave_stack ]]
+ [[ -n '' ]]
+ eval 'leave_stack=("${leave_stack[@]}" "$@")'
++ leave_stack=("${leave_stack[@]}" "$@")
+ [[ -z '' ]]
+ wherenow=/Users/nick.moore/Documents/Automation
+ unset enter_stack
+ [[ -n /Users/nick.moore/Documents/Automation ]]
+ apush enter_stack /Users/nick.moore/Documents/Automation
+ local var=enter_stack
+ shift
+ [[ -n enter_stack ]]
+ [[ -n '' ]]
+ eval 'enter_stack=("${enter_stack[@]}" "$@")'
++ enter_stack=("${enter_stack[@]}" "$@")
+ wherenow=/Users/nick.moore/Documents
+ [[ -n /Users/nick.moore/Documents ]]
+ apush enter_stack /Users/nick.moore/Documents
+ local var=enter_stack
+ shift
+ [[ -n enter_stack ]]
+ [[ -n '' ]]
+ eval 'enter_stack=("${enter_stack[@]}" "$@")'
++ enter_stack=("${enter_stack[@]}" "$@")
+ wherenow=/Users/nick.moore
+ [[ -n /Users/nick.moore ]]
+ apush enter_stack /Users/nick.moore
+ local var=enter_stack
+ shift
+ [[ -n enter_stack ]]
+ [[ -n '' ]]
+ eval 'enter_stack=("${enter_stack[@]}" "$@")'
++ enter_stack=("${enter_stack[@]}" "$@")
+ wherenow=/Users
+ [[ -n /Users ]]
+ apush enter_stack /Users
+ local var=enter_stack
+ shift
+ [[ -n enter_stack ]]
+ [[ -n '' ]]
+ eval 'enter_stack=("${enter_stack[@]}" "$@")'
++ enter_stack=("${enter_stack[@]}" "$@")
+ wherenow=
+ [[ -n '' ]]
+ apush enter_stack /
+ local var=enter_stack
+ shift
+ [[ -n enter_stack ]]
+ [[ -n '' ]]
+ eval 'enter_stack=("${enter_stack[@]}" "$@")'
++ enter_stack=("${enter_stack[@]}" "$@")
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 5
++ ((  5 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /
+ [[ -n / ]]
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 5
++ ((  5 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /
++ alast leave_stack
++ [[ -n '' ]]
++ local var=leave_stack
++ [[ -n leave_stack ]]
+++ eval 'echo ${#leave_stack[@]}'
++++ echo 4
++ ((  4 >= 1  ))
++ eval 'echo "${leave_stack[${#leave_stack[@]} - 1]}"'
+++ echo /
+ [[ / == \/ ]]
++ alen enter_stack
++ local var=enter_stack
++ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 5
+ [[ 5 == \1 ]]
++ alen leave_stack
++ local var=leave_stack
++ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 4
+ [[ 4 == \1 ]]
+ apop enter_stack
+ [[ -n '' ]]
+ local var=enter_stack
+ _apop_return=
+ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 5
+ ((  5 >= 1  ))
+ eval '_apop_return="$(echo "${enter_stack[${#enter_stack[@]} - 1]}")"'
+++ echo /
++ _apop_return=/
+ [[ -n '' ]]
+ eval 'unset enter_stack[$(( ${#enter_stack[@]} - 1))]'
++ unset 'enter_stack[4]'
+ echo /
+ apop leave_stack
+ [[ -n '' ]]
+ local var=leave_stack
+ _apop_return=
+ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 4
+ ((  4 >= 1  ))
+ eval '_apop_return="$(echo "${leave_stack[${#leave_stack[@]} - 1]}")"'
+++ echo /
++ _apop_return=/
+ [[ -n '' ]]
+ eval 'unset leave_stack[$(( ${#leave_stack[@]} - 1))]'
++ unset 'leave_stack[3]'
+ echo /
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 4
++ ((  4 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users
+ [[ -n /Users ]]
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 4
++ ((  4 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users
++ alast leave_stack
++ [[ -n '' ]]
++ local var=leave_stack
++ [[ -n leave_stack ]]
+++ eval 'echo ${#leave_stack[@]}'
++++ echo 3
++ ((  3 >= 1  ))
++ eval 'echo "${leave_stack[${#leave_stack[@]} - 1]}"'
+++ echo /Users
+ [[ /Users == \/\U\s\e\r\s ]]
++ alen enter_stack
++ local var=enter_stack
++ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 4
+ [[ 4 == \1 ]]
++ alen leave_stack
++ local var=leave_stack
++ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 3
+ [[ 3 == \1 ]]
+ apop enter_stack
+ [[ -n '' ]]
+ local var=enter_stack
+ _apop_return=
+ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 4
+ ((  4 >= 1  ))
+ eval '_apop_return="$(echo "${enter_stack[${#enter_stack[@]} - 1]}")"'
+++ echo /Users
++ _apop_return=/Users
+ [[ -n '' ]]
+ eval 'unset enter_stack[$(( ${#enter_stack[@]} - 1))]'
++ unset 'enter_stack[3]'
+ echo /Users
+ apop leave_stack
+ [[ -n '' ]]
+ local var=leave_stack
+ _apop_return=
+ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 3
+ ((  3 >= 1  ))
+ eval '_apop_return="$(echo "${leave_stack[${#leave_stack[@]} - 1]}")"'
+++ echo /Users
++ _apop_return=/Users
+ [[ -n '' ]]
+ eval 'unset leave_stack[$(( ${#leave_stack[@]} - 1))]'
++ unset 'leave_stack[2]'
+ echo /Users
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 3
++ ((  3 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore
+ [[ -n /Users/nick.moore ]]
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 3
++ ((  3 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore
++ alast leave_stack
++ [[ -n '' ]]
++ local var=leave_stack
++ [[ -n leave_stack ]]
+++ eval 'echo ${#leave_stack[@]}'
++++ echo 2
++ ((  2 >= 1  ))
++ eval 'echo "${leave_stack[${#leave_stack[@]} - 1]}"'
+++ echo /Users/nick.moore
+ [[ /Users/nick.moore == \/\U\s\e\r\s\/\n\i\c\k\.\m\o\o\r\e ]]
++ alen enter_stack
++ local var=enter_stack
++ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 3
+ [[ 3 == \1 ]]
++ alen leave_stack
++ local var=leave_stack
++ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 2
+ [[ 2 == \1 ]]
+ apop enter_stack
+ [[ -n '' ]]
+ local var=enter_stack
+ _apop_return=
+ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 3
+ ((  3 >= 1  ))
+ eval '_apop_return="$(echo "${enter_stack[${#enter_stack[@]} - 1]}")"'
+++ echo /Users/nick.moore
++ _apop_return=/Users/nick.moore
+ [[ -n '' ]]
+ eval 'unset enter_stack[$(( ${#enter_stack[@]} - 1))]'
++ unset 'enter_stack[2]'
+ echo /Users/nick.moore
+ apop leave_stack
+ [[ -n '' ]]
+ local var=leave_stack
+ _apop_return=
+ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 2
+ ((  2 >= 1  ))
+ eval '_apop_return="$(echo "${leave_stack[${#leave_stack[@]} - 1]}")"'
+++ echo /Users/nick.moore
++ _apop_return=/Users/nick.moore
+ [[ -n '' ]]
+ eval 'unset leave_stack[$(( ${#leave_stack[@]} - 1))]'
++ unset 'leave_stack[1]'
+ echo /Users/nick.moore
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 2
++ ((  2 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore/Documents
+ [[ -n /Users/nick.moore/Documents ]]
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 2
++ ((  2 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore/Documents
++ alast leave_stack
++ [[ -n '' ]]
++ local var=leave_stack
++ [[ -n leave_stack ]]
+++ eval 'echo ${#leave_stack[@]}'
++++ echo 1
++ ((  1 >= 1  ))
++ eval 'echo "${leave_stack[${#leave_stack[@]} - 1]}"'
+++ echo /Users/nick.moore/Documents
+ [[ /Users/nick.moore/Documents == \/\U\s\e\r\s\/\n\i\c\k\.\m\o\o\r\e\/\D\o\c\u\m\e\n\t\s ]]
++ alen enter_stack
++ local var=enter_stack
++ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 2
+ [[ 2 == \1 ]]
++ alen leave_stack
++ local var=leave_stack
++ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 1
+ [[ 1 == \1 ]]
++ afirst leave_stack
++ [[ -n '' ]]
++ local var=leave_stack
++ [[ -n leave_stack ]]
+++ eval 'echo ${#leave_stack[@]}'
++++ echo 1
++ ((  1 >= 1  ))
++ eval 'echo "${leave_stack[0]}"'
+++ echo /Users/nick.moore/Documents
+ [[ /Users/nick.moore/Documents == \/ ]]
+ apop enter_stack
+ [[ -n '' ]]
+ local var=enter_stack
+ _apop_return=
+ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 2
+ ((  2 >= 1  ))
+ eval '_apop_return="$(echo "${enter_stack[${#enter_stack[@]} - 1]}")"'
+++ echo /Users/nick.moore/Documents
++ _apop_return=/Users/nick.moore/Documents
+ [[ -n '' ]]
+ eval 'unset enter_stack[$(( ${#enter_stack[@]} - 1))]'
++ unset 'enter_stack[1]'
+ echo /Users/nick.moore/Documents
+ apop leave_stack
+ [[ -n '' ]]
+ local var=leave_stack
+ _apop_return=
+ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 1
+ ((  1 >= 1  ))
+ eval '_apop_return="$(echo "${leave_stack[${#leave_stack[@]} - 1]}")"'
+++ echo /Users/nick.moore/Documents
++ _apop_return=/Users/nick.moore/Documents
+ [[ -n '' ]]
+ eval 'unset leave_stack[$(( ${#leave_stack[@]} - 1))]'
++ unset 'leave_stack[0]'
+ echo /Users/nick.moore/Documents
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 1
++ ((  1 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore/Documents/Automation
+ [[ -n /Users/nick.moore/Documents/Automation ]]
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 1
++ ((  1 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore/Documents/Automation
++ alast leave_stack
++ [[ -n '' ]]
++ local var=leave_stack
++ [[ -n leave_stack ]]
+++ eval 'echo ${#leave_stack[@]}'
++++ echo 0
++ ((  0 >= 1  ))
+ [[ /Users/nick.moore/Documents/Automation == '' ]]
++ hostname
+ local host=Nick-Moores-MBPr.local
++ alen leave_stack
++ local var=leave_stack
++ [[ -n leave_stack ]]
++ eval 'echo ${#leave_stack[@]}'
+++ echo 0
+ local stack_size=0
+ : 0
+ local smartcd_runmode=leave
+ [[ 0 -gt 0 ]]
+ ((  0 >= 1  ))
+ unset -v varstash_dir
++ alen enter_stack
++ local var=enter_stack
++ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 1
+ local stack_size=1
+ : 1
+ local smartcd_runmode=enter
+ local descend_copy
+ descend_copy=()
+ ((  1 >= 1  ))
++ alast enter_stack
++ [[ -n '' ]]
++ local var=enter_stack
++ [[ -n enter_stack ]]
+++ eval 'echo ${#enter_stack[@]}'
++++ echo 1
++ ((  1 >= 1  ))
++ eval 'echo "${enter_stack[${#enter_stack[@]} - 1]}"'
+++ echo /Users/nick.moore/Documents/Automation
+ local smartcd_current_dir=/Users/nick.moore/Documents/Automation
+ apop enter_stack
+ [[ -n '' ]]
+ local var=enter_stack
+ _apop_return=
+ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 1
+ ((  1 >= 1  ))
+ eval '_apop_return="$(echo "${enter_stack[${#enter_stack[@]} - 1]}")"'
+++ echo /Users/nick.moore/Documents/Automation
++ _apop_return=/Users/nick.moore/Documents/Automation
+ [[ -n '' ]]
+ eval 'unset enter_stack[$(( ${#enter_stack[@]} - 1))]'
++ unset 'enter_stack[0]'
+ echo /Users/nick.moore/Documents/Automation
+ builtin cd /Users/nick.moore/Documents/Automation
+ acopy smartcd_ondescend_callbacks descend_copy
+ local var=smartcd_ondescend_callbacks
+ shift
+ local dest=descend_copy
+ shift
++ is_array smartcd_ondescend_callbacks
++ local var=smartcd_ondescend_callbacks
++ [[ -n '' ]]
++ local 'pattern=^declare'
+++ declare -p smartcd_ondescend_callbacks
++ type='declare -a smartcd_ondescend_callbacks='\''()'\'''
++ [[ declare -a smartcd_ondescend_callbacks='()' =~ ^declare -a ]]
++ echo 1
+ [[ -n 1 ]]
+ [[ -n descend_copy ]]
+ eval 'descend_copy=("${smartcd_ondescend_callbacks[@]}")'
++ descend_copy=("${smartcd_ondescend_callbacks[@]}")
+ autostash smartcd_ondescend_callbacks
+ [[ -n smartcd_ondescend_callbacks ]]
+ [[ -z 1 ]]
+ local run_from_autostash=1
+ [[ -n smartcd_ondescend_callbacks ]]
+ [[ smartcd_ondescend_callbacks == \a\l\i\a\s ]]
+ local already_stashed=
+ stash smartcd_ondescend_callbacks
+ [[ smartcd_ondescend_callbacks == \-\f ]]
+ [[ -n smartcd_ondescend_callbacks ]]
+ [[ -z 1 ]]
+ [[ -n smartcd_ondescend_callbacks ]]
+ [[ smartcd_ondescend_callbacks == \a\l\i\a\s ]]
+ local stash_expression=smartcd_ondescend_callbacks
+ local stash_which=smartcd_ondescend_callbacks
++ _mangle_var smartcd_ondescend_callbacks
++ local mangle_var_where=/Users/nick.moore/Documents/Automation
++ mangle_var_where=_Users_nick_moore_Documents_Automation
++ local mangled_name=smartcd_ondescend_callbacks
++ echo _tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks
+ local stash_name=_tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks
+ local stash_value=smartcd_ondescend_callbacks
+ stash_value=smartcd_ondescend_callbacks
+ stash_value=smartcd_ondescend_callbacks
+ stash_value=smartcd_ondescend_callbacks
+ stash_value=smartcd_ondescend_callbacks
++ eval echo '$__varstash_alias___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks'
+++ echo
+ [[ -n '' ]]
++ eval echo '$__varstash_function___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks'
+++ echo
+ [[ -n '' ]]
++ eval echo '$__varstash_array___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks'
+++ echo
+ [[ -n '' ]]
++ eval echo '$__varstash_export___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks'
+++ echo
+ [[ -n '' ]]
++ eval echo '$__varstash_variable___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks'
+++ echo
+ [[ -n '' ]]
++ eval echo '$__varstash_nostash___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks'
+++ echo
+ [[ -n '' ]]
+ [[ -z '' ]]
++ eval alias smartcd_ondescend_callbacks
+ local alias_def=
+ [[ -n '' ]]
+ [[ smartcd_ondescend_callbacks != smartcd_ondescend_callbacks ]]
+ [[ -z '' ]]
++ declare -f smartcd_ondescend_callbacks
+ local function_def=
+ [[ -n '' ]]
++ declare -p smartcd_ondescend_callbacks
+ local 'vartype=declare -a smartcd_ondescend_callbacks='\''()'\'''
+ [[ -n declare -a smartcd_ondescend_callbacks='()' ]]
+ [[ -n '' ]]
+ local pattern=declare
+ [[ declare -a smartcd_ondescend_callbacks='()' == declare\ \-\a* ]]
+ [[ -z '' ]]
+ eval '__varstash_array___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks=("${smartcd_ondescend_callbacks[@]}")'
++ __varstash_array___tmp__Users_nick_moore_Documents_Automation_smartcd_ondescend_callbacks=("${smartcd_ondescend_callbacks[@]}")
+ local stashed=1
+ [[ -z 1 ]]
+ shift
+ unset -v _stashing_alias_assign
+ [[ -n '' ]]
+ [[ -z '' ]]
++ _mangle_var AUTOSTASH
++ local mangle_var_where=/Users/nick.moore/Documents/Automation
++ mangle_var_where=_Users_nick_moore_Documents_Automation
++ local mangled_name=AUTOSTASH
++ echo _tmp__Users_nick_moore_Documents_Automation_AUTOSTASH
+ local autostash_name=_tmp__Users_nick_moore_Documents_Automation_AUTOSTASH
+ local varname=smartcd_ondescend_callbacks
+ apush _tmp__Users_nick_moore_Documents_Automation_AUTOSTASH smartcd_ondescend_callbacks
+ local var=_tmp__Users_nick_moore_Documents_Automation_AUTOSTASH
+ shift
+ [[ -n _tmp__Users_nick_moore_Documents_Automation_AUTOSTASH ]]
+ [[ -n '' ]]
+ eval '_tmp__Users_nick_moore_Documents_Automation_AUTOSTASH=("${_tmp__Users_nick_moore_Documents_Automation_AUTOSTASH[@]}"
"$@")'
++ _tmp__Users_nick_moore_Documents_Automation_AUTOSTASH=("${_tmp__Users_nick_moore_Documents_Automation_AUTOSTASH[@]}"
"$@")
+ shift
+ unset -v _stashing_alias_assign
+ [[ -n '' ]]
+ smartcd_ondescend_callbacks=()
++ alen descend_copy
++ local var=descend_copy
++ [[ -n descend_copy ]]
++ eval 'echo ${#descend_copy[@]}'
+++ echo 0
+ ((  0 0  ))
+ local confdir=/scripts/Users/nick.moore/Documents/Automation
+ [[ -f /scripts/Users/nick.moore/Documents/Automation/bash_enter ]]
+ confdir=/hosts/Nick-Moores-MBPr.local/scripts/Users/nick.moore/Documents/Automation
+ [[ -f /hosts/Nick-Moores-MBPr.local/scripts/Users/nick.moore/Documents/Automation/bash_enter
]]
+ [[ -f /Users/nick.moore/.smartcd/Users/nick.moore/Documents/Automation/bash_enter
]]
+ confdir=/Users/nick.moore/.smartcd/scripts/Users/nick.moore/Documents/Automation
+ [[ -f /Users/nick.moore/.smartcd/scripts/Users/nick.moore/Documents/Automation/bash_enter
]]
+ confdir=/Users/nick.moore/.smartcd/hosts/Nick-Moores-MBPr.local/scripts/Users/nick.moore/Documents/Automation
+ [[ -f /Users/nick.moore/.smartcd/hosts/Nick-Moores-MBPr.local/scripts/Users/nick.moore/Documents/Automation/bash_enter
]]
+ [[ -f .bash_enter ]]
++ alen enter_stack
++ local var=enter_stack
++ [[ -n enter_stack ]]
++ eval 'echo ${#enter_stack[@]}'
+++ echo 0
+ stack_size=0
+ : 0
+ ((  0 >= 1  ))
+ [[ -d /Users/nick.moore/Documents ]]
+ builtin cd /Users/nick.moore/Documents
+ [[ -z '' ]]
+ builtin cd /Users/nick.moore/Documents/Automation
+ return 0
++ _smartcd_prompt_hook
++ _smartcd_hook
++ local cwd=/Users/nick.moore/Documents/Automation
++ [[ x/Users/nick.moore/Documents/Automation != \x\/\U\s\e\r\s\/\n\i\c\k\.\m\o\o\r\e\/\D\o\c\u\m\e\n\t\s\/\A\u\t\o\m\a\t\i\o\n
]]
++ local i=0
+++ alen smartcd_onprompt_callbacks
+++ local var=smartcd_onprompt_callbacks
+++ [[ -n smartcd_onprompt_callbacks ]]
+++ eval 'echo ${#smartcd_onprompt_callbacks[@]}'
++++ echo 0
++ ((  0 < 0  ))
++ eval 'shell_session_history_check;' update_terminal_cwd
+++ shell_session_history_check
+++ '[' 1 -eq 0 ']'
+++ update_terminal_cwd
+++ local url_path=
+++ local i ch hexch LC_CTYPE=C LC_ALL=
+++ (( i = 0 ))
+++ (( i < 38 ))
+++ ch=/
+++ [[ / =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=/
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=U
+++ [[ U =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=U
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=s
+++ [[ s =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=s
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=e
+++ [[ e =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=e
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=r
+++ [[ r =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=r
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=s
+++ [[ s =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=s
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=/
+++ [[ / =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=/
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=n
+++ [[ n =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=n
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=i
+++ [[ i =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=i
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=c
+++ [[ c =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=c
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=k
+++ [[ k =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=k
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=.
+++ [[ . =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=.
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=m
+++ [[ m =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=m
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=o
+++ [[ o =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=o
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=o
+++ [[ o =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=o
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=r
+++ [[ r =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=r
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=e
+++ [[ e =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=e
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=/
+++ [[ / =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=/
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=D
+++ [[ D =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=D
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=o
+++ [[ o =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=o
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=c
+++ [[ c =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=c
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=u
+++ [[ u =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=u
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=m
+++ [[ m =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=m
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=e
+++ [[ e =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=e
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=n
+++ [[ n =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=n
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=t
+++ [[ t =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=t
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=s
+++ [[ s =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=s
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=/
+++ [[ / =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=/
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=A
+++ [[ A =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=A
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=u
+++ [[ u =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=u
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=t
+++ [[ t =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=t
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=o
+++ [[ o =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=o
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=m
+++ [[ m =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=m
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=a
+++ [[ a =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=a
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=t
+++ [[ t =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=t
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=i
+++ [[ i =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=i
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=o
+++ [[ o =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=o
+++ (( ++i ))
+++ (( i < 38 ))
+++ ch=n
+++ [[ n =~ [/._~A-Za-z0-9-] ]]
+++ url_path+=n
+++ (( ++i ))
+++ (( i < 38 ))
+++ printf '\e]7;%s\a' file://Nick-Moores-MBPr.local/Users/nick.moore/Documents/Automation
Nick-Moores-MBPr:Automation nick.moore$
15
  • 2
    It would be a good idea to show us,in detail the proceedures that you have tried.
    – fd0
    Commented Sep 24, 2019 at 21:09
  • 1
    Are you using some kind of network directory (e.g. Microsoft Active Directory)?
    – agascon
    Commented Sep 24, 2019 at 21:24
  • 1
    Firstly, welcome to Ask Different! :) I hope you come to find this site has a lot to offer! In case you haven't already, it's worth taking the time to read the tour. As for your question, telling us "I have spent at least 5 hours looking around for answers and trying different things, but nothing is helping." doesn't actually tell us much at all. Can you please edit your question to include what you've already tried?
    – Monomeeth
    Commented Sep 24, 2019 at 21:56
  • 1
    Can you share any startup scripts, such as a bash_profile etc
    – JBallin
    Commented Sep 24, 2019 at 22:02
  • 1
    Do you have something configured to do something every time you change directory (like figure out if the new directory is controlled by git and configure based on that)? You can test for this by running set -x to make the shell print commands as it executes them, then change directories and see what happens in the background. Commented Sep 24, 2019 at 22:22

1 Answer 1

1

As @GordonDavisson pointed out, all I needed to do was comment out the smartcd line in .bash_profile

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .