first commit
This commit is contained in:
commit
0610f4aeab
130 changed files with 9897 additions and 0 deletions
39
fn/-z4h-zle-line-init
Normal file
39
fn/-z4h-zle-line-init
Normal file
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
local -i ret
|
||||
|
||||
if [[ ${CONTEXT-} != start || -v _z4h_transient_rprompt ]]; then
|
||||
if [[ ${CONTEXT} == start ]]; then
|
||||
unsetopt transient_rprompt
|
||||
unset _z4h_transient_rprompt
|
||||
elif [[ ! -o transient_rprompt ]]; then
|
||||
setopt transient_rprompt
|
||||
typeset -g _z4h_transient_rprompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( ${+widgets[-z4h-orig-zle-line-init]} )); then
|
||||
zle -- -z4h-orig-zle-line-init "$@" || ret=$?
|
||||
fi
|
||||
|
||||
if (( ${+_z4h_redraw_fd} )); then
|
||||
zle -F "$_z4h_redraw_fd"
|
||||
exec {_z4h_redraw_fd}>&-
|
||||
unset _z4h_redraw_fd
|
||||
fi
|
||||
|
||||
unset POSTDISPLAY _z4h_autosuggest_buffer _z4h_autosuggestion _zsh_highlight__highlighter_${^ZSH_HIGHLIGHT_HIGHLIGHTERS}_cache
|
||||
typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER=
|
||||
typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR=CURSOR
|
||||
region_highlight=()
|
||||
|
||||
if [[ ${(%):-%~} != ${_z4h_last_dir-} && ! -v _z4h_dir_hist_fd ]]; then
|
||||
typeset -gi _z4h_dir_hist_fd
|
||||
if sysopen -o cloexec -ru _z4h_dir_hist_fd /dev/null; then
|
||||
zle -F $_z4h_dir_hist_fd -z4h-update-dir-history
|
||||
else
|
||||
unset _z4h_dir_hist_fd
|
||||
fi
|
||||
fi
|
||||
|
||||
return ret
|
Loading…
Add table
Add a link
Reference in a new issue