diff --git a/src/shell/scripts/omp.zsh b/src/shell/scripts/omp.zsh index 59ae080b..9e816bb3 100644 --- a/src/shell/scripts/omp.zsh +++ b/src/shell/scripts/omp.zsh @@ -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