mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-12 16:53:37 +08:00
0866013280
__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.
13 lines
964 B
Fish
13 lines
964 B
Fish
# Multiple versions are often installed as clang, clang-7, clang-8, etc.
|
|
# They won't be autoloaded, but once clang++ is used once, they'll gain completions too.
|
|
# This could potentially be moved to __fish_config_interactive.fish in the future.
|
|
|
|
# This pattern unfortunately matches clang-format, etc. as well.
|
|
complete -p '*clang*' -n '__fish_should_complete_switches' -xa '(__fish_clang_complete)'
|
|
complete -c 'clang' -n 'not __fish_should_complete_switches' \
|
|
-xa "(__fish_complete_suffix .o; __fish_complete_suffix .out; __fish_complete_suffix .c; __fish_complete_suffix .cpp; __fish_complete_suffix .so; __fish_complete_suffix .dylib)"
|
|
|
|
# again but without the -x this time for the pattern-matched completion
|
|
complete -p '*clang*' -n 'not __fish_should_complete_switches' \
|
|
-a "(__fish_complete_suffix .o; __fish_complete_suffix .out; __fish_complete_suffix .c; __fish_complete_suffix .cpp; __fish_complete_suffix .so; __fish_complete_suffix .dylib)"
|