mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 04:19:41 -08:00
feat(zsh): trigger a tip check only on a space key input
This commit is contained in:
parent
6612780fd0
commit
b3b4f473b5
|
@ -48,7 +48,10 @@ function self-insert() {
|
|||
zle .self-insert
|
||||
return
|
||||
fi
|
||||
tooltip=$(::OMP:: print tooltip --config="$POSH_THEME" --shell=zsh --command="$BUFFER" --shell-version="$ZSH_VERSION")
|
||||
# trigger a tip check only if the input is a space character
|
||||
if [[ "$KEYS" = " " ]]; then
|
||||
tooltip=$(::OMP:: print tooltip --config="$POSH_THEME" --shell=zsh --command="$BUFFER" --shell-version="$ZSH_VERSION")
|
||||
fi
|
||||
# ignore an empty tooltip
|
||||
if [[ ! -z "$tooltip" ]]; then
|
||||
RPROMPT=$tooltip
|
||||
|
|
Loading…
Reference in a new issue