Tags: patch Find attached a “worse is better” approach for pcomplete, where we parse help messages to generate a list of completions. This is still a sketch. I've added pcomplete functions for a random selection of commands to see if this works reasonably, and I think it probably does. But in any case I don't think it would make sense to try and add completions as detailed as the ones bash provides; there is an awful lot of logic in the files under /usr/share/bash-completion and I don't think anyone would want to redo that work. Some further comments: 1. I'm a bit unsure whether `pcomplete-parse-help' should return a plain list of completions or a completion table. The advantage of the former (which is the current approach) is that it's easier to manipulate the result of the parsing (cf. the need for that in the git case). The advantage of returning a completion table is a better treatment of annotations. 2. I would rather not create a new pcmpl-git.el file (doing so for each new command doesn't seem very scalable), but I wouldn't know where else to put that stuff.