mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 13:57:26 -08:00
fix(zsh): add key binding conditionally
This commit is contained in:
parent
7576a1e9a5
commit
972c3c1048
|
@ -112,6 +112,13 @@ if [[ "::TRANSIENT::" = "true" ]]; then
|
|||
# https://github.com/JanDeDobbeleer/oh-my-posh/discussions/2617#discussioncomment-3911044
|
||||
bindkey '^[[F' end-of-line
|
||||
bindkey '^[[H' beginning-of-line
|
||||
_widgets=$(zle -la)
|
||||
if [[ -n "${_widgets[(r)down-line-or-beginning-search]}" ]]; then
|
||||
bindkey '^[[B' down-line-or-beginning-search
|
||||
fi
|
||||
if [[ -n "${_widgets[(r)up-line-or-beginning-search]}" ]]; then
|
||||
bindkey '^[[B' up-line-or-beginning-search
|
||||
fi
|
||||
fi
|
||||
|
||||
# legacy functions for backwards compatibility
|
||||
|
|
Loading…
Reference in a new issue