diff --git a/.bashrc b/.bashrc index 0054152..575f123 100644 --- a/.bashrc +++ b/.bashrc @@ -43,6 +43,7 @@ export USE_UNICODE=1 export VISUAL=vim export GITRC_ENVIRONMENT=1 export GIT_PRIVATE_RC=$HOME/.private/repo_rc.sh +export XDG_CACHE_HOME=/work/${USER}/.cache # If not an interactive shell, don't proceed any further (ex. SCP commands) # need to do at least basic PATH setup and other common env vars @@ -67,6 +68,29 @@ if [[ -d "$HOME/.vscode-server" ]]; then export PATH=$HOME/.vscode-server/bin/${code_latest_version}bin/remote-cli:$PATH fi +# Setup and refresh the XDG_CACHE_HOME directory if needed +if [[ ! -d $XDG_CACHE_HOME ]]; then + if [[ ! -d $(dirname $XDG_CACHE_HOME) ]]; then + # Parent directory doesn't exist. Reset to $HOME + export XDG_CACHE_HOME=$HOME/.cache + else + mkdir $XDG_CACHE_HOME + fi +fi + +############################## +# refresh_vscode_ipc() +# +# This is a helper routine to refresh the VSCODE_IPC_HOOK_CLI env variable. In some instances this can be left stale +# pointing to a vscode-server instance that is no longer there. When this occurs, the `code ` command may produce +# an error indicating an IPC sock error. Refreshing this env variable should fix the problem. +function refresh_vscode_ipc() { + echo -n "Refreshing the VSCODE_IPC_HOOK_CLI env variable ..." + export VSCODE_IPC_HOOK_CLI=$(lsof 2> /dev/null | grep $USER | grep vscode-ipc | awk '{print $(NF-1)}' | head -n 1) + echo " done [$VSCODE_IPC_HOOK_CLI]." +} +alias vscode-refresh=refresh_vscode_ipc + ############################## # initialize_git_repository() # diff --git a/.vim/pack/plugins/start/tagbar b/.vim/pack/plugins/start/tagbar index 83933d5..402e3e1 160000 --- a/.vim/pack/plugins/start/tagbar +++ b/.vim/pack/plugins/start/tagbar @@ -1 +1 @@ -Subproject commit 83933d557409639df53fd2ca21484279b5854c1e +Subproject commit 402e3e117fc7b47e43dbb87c51064daae3bc3bf3