From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1559 Path: news.gmane.org!not-for-mail From: Sascha =?iso-8859-15?Q?H=FCdepohl?= Newsgroups: gmane.comp.sysutils.supervision.general Subject: bash completion for sv Date: Thu, 18 Oct 2007 22:52:36 +0200 Message-ID: <20071018205236.GA2016@b491.dyndns.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" X-Trace: ger.gmane.org 1192740772 21801 80.91.229.12 (18 Oct 2007 20:52:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Oct 2007 20:52:52 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-1794-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Oct 18 22:52:53 2007 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1IicMJ-0004WR-0q for gcsg-supervision@gmane.org; Thu, 18 Oct 2007 22:52:47 +0200 Original-Received: (qmail 30962 invoked by uid 76); 18 Oct 2007 20:52:58 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 30956 invoked from network); 18 Oct 2007 20:52:58 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-11) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1559 Archived-At: --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi! I wrote a little bash completion script for sv. Maybe someone finds it usefull. To use it, copy the attached script to a directory you like and add a line like: . /script to your ~/.bashrc regards sascha --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=sv_completion # vim:ft=sh shopt -s extglob _svcomp() { local cur cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=() if [ $COMP_CWORD -eq 1 ]; then COMPREPLY=( $( compgen -W 'status up down once pause cont hup alarm interrupt quit 1 2 term kill exit' -- $cur ) ) else COMPREPLY=( $( compgen -W "$(ls /var/service/)" -- $cur ) ) fi return 0 } complete -F _svcomp sv --VS++wcV0S1rZb1Fb--