fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

lengyijunFixes #8924 via `__fish_complete_suffix` overhaulaa65856ee

master
726 B12 linesraw
1# Multiple versions are often installed as clang, clang-7, clang-8, etc.
2# They won't be autoloaded, but once clang++ is used once, they'll gain completions too.
3# This could potentially be moved to __fish_config_interactive.fish in the future.
4
5# This pattern unfortunately matches clang-format, etc. as well.
6complete -p '*clang*' -n __fish_should_complete_switches -xa '(__fish_complete_clang)'
7complete -c clang -n 'not __fish_should_complete_switches' \
8    -k -xa "(__fish_complete_suffix .o .out .c .cpp .so .dylib)"
9
10# again but without the -x this time for the pattern-matched completion
11complete -p '*clang*' -n 'not __fish_should_complete_switches' \
12    -k -a "(__fish_complete_suffix .o .out .c .cpp .so .dylib)"