Commit graph

7 commits

Author SHA1 Message Date
lengyijun
aa65856ee0 Fixes #8924 via __fish_complete_suffix overhaul
Before:
* hand write arg parse
* only accepts one suffix

After:
* use `arg_parse` to parse args
* accepts multi suffixes

Closes #9611.
2023-03-12 22:07:44 -05:00
Johannes Altmanninger
4dae106911 Use complete --keep-order with __fish_complete_suffix to prioritize files with matching suffixes
Part of #7040
2020-12-23 19:14:10 +01:00
Fabian Homborg
9367d4ff71 Reindent functions to remove useless quotes
This does not include checks/function.fish because that currently
includes a "; end" in a message that indent would remove, breaking the test.
2020-03-09 19:46:43 +01:00
Jason Nader
a619f69b15 Rename functions to match others 2020-02-17 09:55:05 +01:00
Fabian Homborg
0866013280 Stop using __fish_complete_suffix with a braced argument
__fish_complete_suffix accepts a first argument containing a
brace-expansion, like

    __fish_complete_suffix '.{c,cpp,py}'

We're gonna be removing the `eval` that does that shortly, so let's
remove all uses in our code.
2019-12-28 17:10:23 +01:00
Fabian Homborg
ce245704d7 Reformat completion scripts
These were excluded from style.fish
2019-05-05 12:53:09 +02:00
Mahmoud Al-Qudsi
5ad292328a Add dynamic clang completions via clang --autocomplete
Use clang/clang++'s own autocompletion support to complete arguments. It
is rather convoluted as clang generates autocompletions for a portion of
the current token rather than the entire token, e.g. while `--st` will
autocomplete to `--std=` (which is fine by fish), `--std=g` will
autocomplete to `gnu...` without the leading `--std=` which breaks fish'
support for the completion.

Additionally, on systems where clang/clang++ is the system compiler
(such as FreeBSD), it is very often for users to invoke a newer version
of clang/clang++ installed as clang[++]-NN instead of clang. Using a
monkey-patched version of `complete -p` to support that without breaking
(future) completions for commands like `clang-format`.

Closes #4174.
2018-10-24 23:14:55 -05:00