Skip to content

Commit

Permalink
refactor(zsh): minor reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
midchildan committed Jan 27, 2024
1 parent 4949d73 commit 411cd6e
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions files/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ zstyle ':completion:complete-from-help:*' completer _complete _gnu_generic
##}}}
# Editing & Keybindings {{{

setopt interactive_comments

autoload -Uz copy-earlier-word && zle -N copy-earlier-word
autoload -Uz edit-command-line && zle -N edit-command-line
autoload -Uz insert-composed-char && zle -N insert-composed-char
Expand Down Expand Up @@ -210,9 +212,19 @@ bindkey -M menuselect \
done
}

autoload -Uz select-word-style && select-word-style bash
autoload -Uz url-quote-magic && zle -N self-insert url-quote-magic

if is-at-least 5.2; then
autoload -Uz bracketed-paste-url-magic && \
zle -N bracketed-paste bracketed-paste-url-magic
fi

##}}}
# Terminal Support {{{

setopt no_flowcontrol

__set_title() {
if [[ -n "$SSH_CONNECTION" ]]; then
print -Pn "\e]0;%m: %1~\a"
Expand Down Expand Up @@ -281,19 +293,12 @@ fi

setopt long_list_jobs
setopt no_clobber
setopt no_flowcontrol
autoload -Uz select-word-style && select-word-style bash
autoload -Uz zrecompile && \
zrecompile -pq -R ~/.zshrc -- -M ~/.cache/zsh/compdump &!
autoload -Uz url-quote-magic && zle -N self-insert url-quote-magic
if is-at-least 5.2; then
autoload -Uz bracketed-paste-url-magic && \
zle -N bracketed-paste bracketed-paste-url-magic
fi
zrecompile -pq ~/.cache/zsh/compdump &!

##}}}
# Theme {{{

###########
# Theme #
###########
if [[ "$TERM" == "dumb" ]]; then
unsetopt zle prompt_cr prompt_subst
add-zsh-hook -D precmd '*'
Expand Down

0 comments on commit 411cd6e

Please sign in to comment.