wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.72k stars 749 forks source link

Command palette: allow customizing command names #3075

Open eugenesvk opened 1 year ago

eugenesvk commented 1 year ago

Is your feature request related to a problem? Please describe. Fuzzy searching is in general a great way to quickly find what you need. However, due to fuzziness it can also be a bit too broad sometimes.

Describe the solution you'd like One good way to make it even better is to have some unique part of the name that allows you to filter out the non-relevant matches. Another benefit of this is being able group commands that are similar in function, but might have different names, so you can pre-filter to then visually see which ones you'd need and refine your search In a way it's to the current word prefix like Window, but shorter, for example, that you could bind to some convenient r

For this to work you'd need to be able to override the default commands with your own copies with different names, but the same function (so you don't need to recreate all the functionality yourself, but just copy&paste the defaults and only change the names), as well as add your own commands with your own names

Describe alternatives you've considered Using the default word-based groups

Additional context (a simplified example based on a text editor) let's say you'd like to find commands that deal with regexes, so you type rege and find a syntax command that you don't care about at the top:

cp1

But if you add a ◊ to the regex commands, then instead of rege you could hit r and have your regex commands jump to the top

cp2
kaddkaka commented 1 year ago

The fuzzy syntax used by fzf has several ways to deal with this (see https://github.com/junegunn/fzf#search-syntax)

For example:

Unfortunately this is not the behavior of Wezterm currently. I would vote for something closer to fzf'z approach as that doesn't have to be configured but still can be used to filter the list iteratively.