mac-zsh-completions
mac-zsh-completions copied to clipboard
feature-request... add zsh completions for sysctl per man page for sysctl -N
The man sysctl
for argument -N says:
-N Show only variable names, not their values. This is particularly
useful with shells that offer programmable completion. To enable
completion of variable names in zsh(1) (ports/shells/zsh), use the
following code:
listsysctls () { set -A reply $(sysctl -AN ${1%.*}) }
compctl -K listsysctls sysctl
I am trying to figure out how to do this and will update here if if a PR does not beat me to it. (I am more a basher, new to zsh and oh-my-zsh) ;-)