-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to disable terminal beep when exiting search #3864
Comments
to reproduce:setopt beep
source <(fzf --zsh)
# press ctrl-r
# press escape
# hear the beep man zshoptions | less --pattern 'Beep on error in ZLE'
# Zle
# BEEP (+B) <D>
# Beep on error in ZLE. Since this falls within the user's realm and how they configure their shell startup files, no action should be taken by Does the look foo | fzf
# press escape |
@LangLangBart So using |
I am confused; the Lines 107 to 138 in e2401ac
Great, so there is no issue with |
Sorry that was a mistake on my part. I meant to say |
I assume you mean the one from Example: The two functions will run after a command has been read ( # ensure 'EPOCHSECONDS' is loaded
zmodload -F zsh/datetime p:EPOCHSECONDS || return
get_time() {
zbell_timestamp=$EPOCHSECONDS
}
ring_bell() {
((EPOCHSECONDS - zbell_timestamp >= 10)) && printf '\a'
}
# register the functions as hooks
preexec_functions+=(get_time)
precmd_functions+=(ring_bell) The sound from find /System/Library/Sounds/ /System/Library/PrivateFrameworks/ToneLibrary.framework \
-type f \
\( -name '*.aiff' \
-o -name '*.au' \
-o -name '*.caf' \
-o -name '*.m4r' \
-o -name '*.mp2' \
-o -name '*.mp3' \
-o -name '*.wav' \) |
fzf \
--preview 'afplay {}' \
--preview-window '0' I like this one; you might need to add afplay /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/AlertTones/Modern/Complete.m4r
# disowned background job
afplay /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/AlertTones/Modern/Complete.m4r &| The maintainer would likely appreciate it if you close the issue if there are no issues left. Footnotes |
Checklist
man fzf
)Output of
fzf --version
0.52.1 (brew)
OS
Shell
Problem / Steps to reproduce
When using a terminal that has the audio beep enabled fzf emits a beep when exiting a search via escape or ctrl+c. I find this feedback unnecessary and distracting so I would appreciate an option to disable it.
The text was updated successfully, but these errors were encountered: