]> id.pley.net Git - dotfiles.git/blobdiff - zsh_webkit_login
Added has() function; made EDITOR variables dependent on whether terminal is remote.
[dotfiles.git] / zsh_webkit_login
index 6dc46579aab34e1e3d1f3081356f369dd8dc1dbb..589a236360e9a01b1b3c002df03750d8ebb4ea85 100644 (file)
@@ -20,4 +20,22 @@ _switchto() { _arguments '1:dir:_webkit_dirs' }
 
 compdef _switchto switchto
 
+if [[ $( has bbedit ) == 'yes' ]]; then
+    export GUI_EDITOR="bbedit -w"
+elif [[ $( has mate_wait ) == 'yes' ]]; then
+    export GUI_EDITOR="mate_wait"
+else
+    export GUI_EDITOR="vim"
+fi
+
+if [[ -z "$SSH_TTY" ]]; then
+    export EDITOR="$GUI_EDITOR"
+    export SVN_LOG_EDITOR="$GUI_EDITOR"
+    export GIT_SEQUENCE_EDITOR="$GUI_EDITOR"
+else
+    export EDITOR=vim
+    export SVN_LOG_EDITOR=vim
+    export GIT_SEQUENCE_EDITOR=vim
+fi
+
 switchto git