cd-extras icon indicating copy to clipboard operation
cd-extras copied to clipboard

Option to disable beep?

Open jetersen opened this issue 4 years ago • 8 comments

Hi could we have an option to disable the beep? https://github.com/nickcox/cd-extras/blob/e111a9edc9f5bf892359a68cd88a508e49ba0683/cd-extras/private/CompletePaths.ps1#L120

jetersen avatar Apr 17 '21 19:04 jetersen

Yeah, we definitely could.

Out of interest, does it happen often for you? I tend to have a full screen terminal with $cde.MaxCompletions = 0 and it's pretty rare that I'll max it out.

nickcox avatar Apr 18 '21 00:04 nickcox

I rarely use full screen terminal, and dislike any beeping... The terminal should be silent. Who want's to be listening to music and than random beeps coming from your terminal. Honestly the code works as expected, why add the beep? 🤔 I can visually determine when the list has been truncated, I don't need an audio queue.

jetersen avatar Apr 18 '21 15:04 jetersen

I was going to suggest adding some sort of visual indicator. 😄

PSReadLine seems to do it with a prompt, Display all {n} possibilities? (y or n), which is also pretty annoying, imo.

nickcox avatar Apr 19 '21 05:04 nickcox

If the user does not see the option they are looking for they can finetune the search.

Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete

Seems to provide least annoyance but occasionally it beeps.

jetersen avatar Apr 19 '21 05:04 jetersen

What if we made it optionally visible in the custom tooltip section?

image

nickcox avatar Apr 19 '21 10:04 nickcox

That's way better than a beep 👏

jetersen avatar Apr 19 '21 10:04 jetersen

👍

This is sitting in master if you want to try it out. Otherwise I'll likely cut a release in the next week or so.

nickcox avatar Apr 19 '21 12:04 nickcox

Tested and works great!

jetersen avatar Apr 19 '21 14:04 jetersen

resolved in https://github.com/nickcox/cd-extras/commit/cc803e1e41444a4b1405581f33a7c9df0a9dcb7c

jetersen avatar Mar 10 '23 18:03 jetersen