diff options
Diffstat (limited to 'zsh/zshrc')
-rw-r--r-- | zsh/zshrc | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -22,20 +22,22 @@ setopt HIST_IGNORE_SPACE # Entries with leading space ignored setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes # Change cursor shape for different vi modes (Cred: LARBS) -function zle-keymap-select () { - case $KEYMAP in - vicmd) echo -n '\e[1 q';; # block - viins|main) echo -n '\e[5 q';; # beam - esac -} -zle -N zle-keymap-select -zle-line-init() { - #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -n "\e[5 q" -} -zle -N zle-line-init -echo -n '\e[5 q' # Use beam shape cursor on startup -preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt +if [ -n "$DISPLAY" ]; then + function zle-keymap-select () { + case $KEYMAP in + vicmd) echo -n '\e[1 q';; # block + viins|main) echo -n '\e[5 q';; # beam + esac + } + zle -N zle-keymap-select + zle-line-init() { + #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -n "\e[5 q" + } + zle -N zle-line-init + echo -n '\e[5 q' # Use beam shape cursor on startup + preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt +fi # Load zsh plugins; should be last for plugin in $ZPLUGINS; do |