Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Descriptions from section 8 in commands completion



The manual section 8 covers valuable pages.

From man-db's man(1):
    8  System administration commands (usually only for root)

From Wikipedia:
"The manual is generally split into eight numbered sections, organized
as follows (on BSD, Unix and Linux):
[...]
8  System administration commands and daemons"

Seems quite popular on my system:
for s in 1 6 8;(print -n /usr/share/man/man$s:;print -l /usr/share/man/man$s/*|wc -l)
1:2076
6:7
8:633

Signed-off-by: Pierre Carrier <pierre@xxxxxxxxxxx>
---
 Completion/Unix/Type/_path_commands | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Type/_path_commands b/Completion/Unix/Type/_path_commands
index 22d2aae..155cd99 100644
--- a/Completion/Unix/Type/_path_commands
+++ b/Completion/Unix/Type/_path_commands
@@ -49,7 +49,7 @@ if zstyle -t ":completion:${curcontext}:" extra-verbose; then
   if ( [[ -n $first ]] || _cache_invalid command-descriptions ) && \
     ! _retrieve_cache command-descriptions; then
     local line
-    for line in "${(f)$(_call_program command-descriptions _call_whatis -s 1 -r .\\\*\; _call_whatis -s 6 -r .\\\* 2>/dev/null)}"; do
+    for line in "${(f)$(_call_program command-descriptions _call_whatis -s 1 -r .\\\*\; _call_whatis -s 6 -r .\\\*\; _call_whatis -s 8 -r .\\\* 2>/dev/null)}"; do
       [[ -n ${line:#(#b)([^ ]#) #\([^ ]#\)( #\[[^ ]#\]|)[ -]#(*)} ]] && continue;
       [[ -z $match[1] || -z $match[3] || -z ${${match[1]}:#*:*} ]] && continue;
       _command_descriptions[$match[1]]=$match[3]
-- 
1.7.11.1



Messages sorted by: Reverse Date, Date, Thread, Author