[trunk] -> [extra] 'runit-bash-completions-1-1' add

master
Qontinuum 4 months ago
parent cd91647780
commit 24c4e58f81
  1. 15
      trunk/PKGBUILD
  2. 24
      trunk/sv
  3. 15
      x86_64/extra/PKGBUILD
  4. 24
      x86_64/extra/sv

@ -0,0 +1,15 @@
# Maintainer: Qontinuum <qontinuum@artixlinux.org>
pkgname=runit-bash-completions
pkgver=1
pkgrel=1
pkgdesc="Runit completions for Bash"
arch=('any')
url="https://artixlinux.org"
depends=('bash-completion')
source=('sv')
sha256sums=('2e6ab7205e1a1782bf671fcece6598ad2df987b02b10ae7cd4fcd4d26ee44b2f')
package() {
install -Dm644 sv "$pkgdir/usr/share/bash-completion/completions/sv"
}

@ -0,0 +1,24 @@
_sv()
{
local cur prev words cword commands
_init_completion || return
commands='up down status once pause cont hup alarm interrupt 1 2 term kill exit start stop restart shutdown force-stop force-reload force-restart force-shutdown'
case $prev in
-w)
return
;;
-* | sv)
COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
return
;;
*)
COMPREPLY=( /run/runit/service/* )
COMPREPLY=( ${COMPREPLY[@]##*/} )
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) )
return
;;
esac
}
complete -F _sv sv

@ -0,0 +1,15 @@
# Maintainer: Qontinuum <qontinuum@artixlinux.org>
pkgname=runit-bash-completions
pkgver=1
pkgrel=1
pkgdesc="Runit completions for Bash"
arch=('any')
url="https://artixlinux.org"
depends=('bash-completion')
source=('sv')
sha256sums=('2e6ab7205e1a1782bf671fcece6598ad2df987b02b10ae7cd4fcd4d26ee44b2f')
package() {
install -Dm644 sv "$pkgdir/usr/share/bash-completion/completions/sv"
}

@ -0,0 +1,24 @@
_sv()
{
local cur prev words cword commands
_init_completion || return
commands='up down status once pause cont hup alarm interrupt 1 2 term kill exit start stop restart shutdown force-stop force-reload force-restart force-shutdown'
case $prev in
-w)
return
;;
-* | sv)
COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
return
;;
*)
COMPREPLY=( /run/runit/service/* )
COMPREPLY=( ${COMPREPLY[@]##*/} )
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) )
return
;;
esac
}
complete -F _sv sv
Loading…
Cancel
Save