mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
complete: Do fuzzy match for --do-complete
This only did prefix matching, which is generally less useful. All existing users _should_ be okay with this since they want to provide completions. Fixes #5467. Fixes #2318.
This commit is contained in:
parent
bfb61879cd
commit
ecfe4acd0c
2 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
|||
- `math` now accepts `--scale=max` for the maximum scale (#5579).
|
||||
- The `forward-bigword` binding now interacts correctly with autosuggestions (#5336)
|
||||
- Fish now tries to guess if the system supports Unicode 9 (and displays emoji as wide), hopefully making setting $fish_emoji_width superfluous in most cases (#5722).
|
||||
- `complete --do-complete` now also does fuzzy matches (#5467).
|
||||
- Lots of improvements to completions.
|
||||
- Added completions for
|
||||
- `cf`
|
||||
|
|
|
@ -318,7 +318,7 @@ int builtin_complete(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
|||
recursion_level++;
|
||||
|
||||
std::vector<completion_t> comp;
|
||||
complete(do_complete_param, &comp, COMPLETION_REQUEST_DEFAULT, parser.vars());
|
||||
complete(do_complete_param, &comp, COMPLETION_REQUEST_DEFAULT | COMPLETION_REQUEST_FUZZY_MATCH, parser.vars());
|
||||
|
||||
for (size_t i = 0; i < comp.size(); i++) {
|
||||
const completion_t &next = comp.at(i);
|
||||
|
|
Loading…
Reference in a new issue