zsh-users / zsh-completions

Additional completion definitions for Zsh.
Other
6.99k stars 714 forks source link

Most tools in util-linux are missing completions #444

Open olejorgenb opened 8 years ago

olejorgenb commented 8 years ago

https://en.wikipedia.org/wiki/Util-linux

These have upstream bash completion definitions.

But a quick attempt[1] at using bashcompinit didn't work flawlessly. (what is the policy on including bash completions btw?)

A crude way of finding out which tools are missing completion definitions:

# In directory util-linux/bash-completion
for x in *; do
    if [[ -z $_comps[$x] ]]; then echo $x; fi
done

This lists almost all the tools. (but it isn't a perfect test. If anyone know of a better way of looking up how a given command is completed I'd be interested)

[1]

bashcompinit
source ./lsblk  # is this the correct way?
lsblk --output F<tab>
# _lsblk_module:43: command not found: compopt
olejorgenb commented 7 years ago

Note: seems https://github.com/RobSis/zsh-completion-generator works pretty well for generating the initial skeleton.