zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Descriptions from section 8 in commands completion
@ 2012-06-27 23:27 Pierre Carrier
  0 siblings, 0 replies; only message in thread
From: Pierre Carrier @ 2012-06-27 23:27 UTC (permalink / raw)
  To: zsh-workers; +Cc: Pierre Carrier

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@spotify.com>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-27 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 23:27 [PATCH] Descriptions from section 8 in commands completion Pierre Carrier

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).