supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Sascha Hüdepohl" <renegat@fbe.hs-bremen.de>
To: supervision@list.skarnet.org
Subject: bash completion for sv
Date: Thu, 18 Oct 2007 22:52:36 +0200	[thread overview]
Message-ID: <20071018205236.GA2016@b491.dyndns.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

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: 
. <path>/script
to your ~/.bashrc

regards
sascha

[-- Attachment #2: sv_completion --]
[-- Type: text/plain, Size: 370 bytes --]

# 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

                 reply	other threads:[~2007-10-18 20:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071018205236.GA2016@b491.dyndns.org \
    --to=renegat@fbe.hs-bremen.de \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).