]> arthur.barton.de Git - ax-zsh.git/commitdiff
iterm2: Try to load user-local shell integration first
authorAlexander Barton <alex@barton.de>
Tue, 13 Feb 2018 14:23:42 +0000 (15:23 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 13 Feb 2018 14:23:44 +0000 (15:23 +0100)
And only fall back to ax-zsh included version when not found.

plugins/iterm2/iterm2.zshrc

index 470e87320d7c39ba1a639488e145abb623ab162d..dc24d79ba63cbb1a44f92e6bbd6ee92a5dcb0906 100644 (file)
@@ -9,6 +9,11 @@ axzsh_is_dumb_terminal && return 91
 [[ -z "$ITERM_SHELL_INTEGRATION_INSTALLED" ]] || return 91
 [[ "$TERM" != "screen" && "$TERM" != "screen-256color" ]] || return 91
 
+# Try to source user-local shell integration installed by iTerm2 itself,
+# and only fall back to the implementation here when not found.
+[[ -e "$HOME/.iterm2_shell_integration.zsh" ]] && source "$HOME/.iterm2_shell_integration.zsh"
+[[ -z "$ITERM_SHELL_INTEGRATION_INSTALLED" ]] || return 0
+
 ITERM_SHELL_INTEGRATION_INSTALLED="Yes"
 ITERM2_SHOULD_DECORATE_PROMPT="1"