Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Ignore informational messages in 'service' command completion script
- X-seq: zsh-workers 30179
- From: Mariusz Glebocki <mglb@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Ignore informational messages in 'service' command completion script
- Date: Fri, 03 Feb 2012 00:44:19 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
In Fedora 16, 'service' command completion showed information printed by 'chkconfig --list' to stderr.
diff --git a/Completion/Unix/Type/_services b/Completion/Unix/Type/_services
index 4960547..3dd1e12 100644
--- a/Completion/Unix/Type/_services
+++ b/Completion/Unix/Type/_services
@@ -10,7 +10,7 @@ if [[ $OSTYPE = freebsd* ]]; then
_wanted services expl service compadd "$@" - $alls[@] && ret=0
fi
elif chkconfig --list > /dev/null 2>&1; then
- alls=( ${(f)"$(LANGUAGE=C LANG=C LC_ALL=C chkconfig --list)"} )
+ alls=( ${(f)"$(LANGUAGE=C LANG=C LC_ALL=C chkconfig --list 2> /dev/null)"} )
inits=( ${${${alls[1,(r)xinetd based*]}[1,-2]}/%[[:space:]]*/} )
xinetds=( ${${${${alls[(r)xinetd based*,-1]}[2,-1]}/#[[:space:]]#}/%:*} )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author