mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-07 13:22:56 +02:00
parent
bad126fe77
commit
952a4cdb03
2 changed files with 27 additions and 0 deletions
26
srcpkgs/runit/files/sv
Normal file
26
srcpkgs/runit/files/sv
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# bash completion for runit sv(1)
|
||||||
|
|
||||||
|
_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=( /var/service/* )
|
||||||
|
COMPREPLY=( ${COMPREPLY[@]##*/} )
|
||||||
|
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
complete -F _sv sv
|
|
@ -53,4 +53,5 @@ do_install() {
|
||||||
done
|
done
|
||||||
|
|
||||||
vinstall ${FILESDIR}/_sv 644 usr/share/zsh/site-functions
|
vinstall ${FILESDIR}/_sv 644 usr/share/zsh/site-functions
|
||||||
|
vinstall ${FILESDIR}/sv 644 usr/share/bash-completion/completions
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue