mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[zsh] don't sync the cwd when a terminal is opened inside vscode (requested by @lexisother)
This commit is contained in:
parent
0597f8fde9
commit
9a1a338262
1 changed files with 15 additions and 1 deletions
16
zsh/zshrc
16
zsh/zshrc
|
@ -65,6 +65,20 @@ if [[ -z "$DOTFILES_DISABLE_WELCOME" ]]; then
|
|||
welcome
|
||||
fi
|
||||
|
||||
if [[ -z "$DOTFILES_SYNC_LAST_WORKING_DIR" ]]; then
|
||||
should_really_sync=0
|
||||
if [[ -v DOTFILES_SYNC_LAST_WORKING_DIR ]]; then
|
||||
# Variable is defined
|
||||
if [[ -n "$DOTFILES_SYNC_LAST_WORKING_DIR" ]]; then
|
||||
# Variable is non-empty
|
||||
should_really_sync=1
|
||||
fi
|
||||
else
|
||||
# Variable is undefined
|
||||
if [[ "$TERM_PROGRAM" != "vscode" ]]; then
|
||||
should_really_sync=1
|
||||
fi
|
||||
fi
|
||||
if (( should_really_sync )); then
|
||||
sync_working_dir_load
|
||||
fi
|
||||
unset should_really_sync
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue