]> Sergey Matveev's repositories - stargrave-blog.git/commit
FreeBSD sysctl и дополнения для zsh
authorSergey Matveev <stargrave@stargrave.org>
Sat, 22 Feb 2025 11:50:02 +0000 (14:50 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 22 Feb 2025 11:50:02 +0000 (14:50 +0300)
commit77c83b2684e458f89639e26ab046ad2dfd0c73d4
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent4561ee65112ebdc1d30503f026744813129a2a31
FreeBSD sysctl и дополнения для zsh

man sysctl имеет примеры для дополнения значений sysctl-а для zsh:

     -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

             To enable completion of variable names in tcsh(1), use:

                   complete sysctl 'n/*/`sysctl -Na`/'

Эта ОС не перестаёт приятно удивлять и радовать такими мелочами и
дружелюбностью к пользователю.