I made some improvements to the _gcc completion script to better handle macOS and clang. Hopefully, you like them. Enabled The -l option to complete .dylib files as well as .so* and .a. Allowed the -l option to take an argument right after it, and gave it a description. For example -ly or -lz. The current completion for the argument of -l wouldn't work if the $LD_LIBRARY_PATH had more than one path in it, because paths are separated by : traditionally in that variable, so I made sure completion works if there are :'s in it. Also I added /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib to the default path since that's the one macOS uses. Added the -framework option, and completed the names of frameworks it can take. frameworks are macOS's style of library. Added all the -fobjc- options like -fobjc-arc, -fobjc-abi-version, -fobjc-runtime, -F, etc. Added the -e, --entry option to the generic section since it was missing before. Added the --include option, it already had -include, but I found --include while looking at the clang docs, and verified it also works with gcc, so I put it right next to the -include option. I changed the input file type because sometimes it's useful to include library files on the command line, and these have extensions .so*, .a, .dylib, or even with no extension like in mac's frameworks. I thought it better if it just completed all files and not just .c, .cpp, .m, etc. Gave option descriptions to the options that didn't have one before, like -o, -d, -g, -O, -Wl Lowercased the first letter of all the option descriptions. This seems to be convention in other scripts like _find, _chmod, and _git. I removed -fprint-source-range-info, I didnt see it in the clang docs, and the option doesn't work. It probably meant -fdiagnostics-print-source-range-info. I removed the matchspec "r:|[_-]=*" from the _arguments call because there were certain options where I would try to complete them, and they positioned the cursor elsewhere unexpectedly. for example, I wrote "clang --opt" and after it completed up until --optimiz, it positioned me on the second - when I expected to be at the end of the fully completed option, --optimize=. also it didn't fully complete, it left it at --optimiz. I combined options whose descriptions used to be "same as -x". So -O and --optimize, -w and --no-warnings, -v and --verbose. I added options from "gcc --help=c", that didn't already exist, such as -ansi, --all-warnings, --assert, and others. I needed to add a dependency flag for the -M option, so instead of adding it to the existing list ((...)), I coverted that action to ->dependency style action, and added the new value at the end of the script. The new flags are -MD and -MP. I sorted all the -Wwarning-name options, it makes it easier to look through the list. I added a completion for arguments to -Werror= which is used to turn warnings into errors, it has to extract the name of the warning from all the -Wwarning options, for example -Wvla will cause -Werror=vla to be a completion. To do this I had to extract the warnings arguments into their own array, and make sure they are separated from other -W options that are not warnings, such as -Werror, -Wfatal-errors, and -Wl. I use this same completion for the --warn-name options. I removed duplicate options --verbose, -fassociative-math, -fauto-inc-dec, -fdelete-dead-exceptions, -ffunction-cse, -fgraphite, -findirect-inlining, -fira-loop-pressure, -fira-share-save-slots, -fira-share-spill-slots, -fmodulo-sched-allow-regmoves, -fopt-info, -fpartial-inlining, -freciprocal-math, -fstack-protector-all, -fstack-protector, -fstrict-overflow, -fstrict-volatile-bitfields, -ftracer, -Weffc++. I found the grouping of options based on which --help=type wasn't all that useful and made it harder to spot the duplicates. The options are still grouped by: target dependent options, clang only options, gcc only options, warnings, then all the rest, because they need to be. I went over every option listed on https://clang.llvm.org/docs/ClangCommandLineReference.html, and made sure to add them, If I saw that gcc supported the option, I added it to a common location, if not, I added it to only clang's completion. This adds a large number of options, we may want to comment some of these out. Thanks for looking at all this.