[Feature request] Bash-completion for runit sv 19 May 2021, 12:57:55 sv on Artix has no completion script. While you can always run ls /run/runit/service and use the single-letter shortcuts (or even RSM), having a completion script would be a nice addition to the official runit/bash-completion package.So far, I'm using Void's completion script (installed as an extra package, ran through with sed -i s@/var/@/run/runit/@g to be compatible with Artix):https://raw.githubusercontent.com/void-linux/runit/master/completions/sv.bash 3 Likes
Re: [Feature request] Bash-completion for runit sv Reply #1 – 19 July 2021, 18:37:11 In case anyone is interested, I got around and uploaded this package to the AUR:https://aur.archlinux.org/packages/runit-completion/ 3 Likes
Re: [Feature request] Bash-completion for runit sv Reply #2 – 23 May 2022, 02:22:26 hey, thanks, exactly what i was looking for !This page came up in first on startpage the aur package does not exist anymore, but writing it to /usr/share/bash-completion/completions/sv does the trickand to be perfect, change the path /var/service/ to /run/runit/service/ to be able to autocomplete the name of the servicehere is the final version to use:Code: [Select]# 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=( /run/runit/service/* ) COMPREPLY=( ${COMPREPLY[@]##*/} ) COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- ${cur}) ) return ;; esac}complete -F _sv svhaving the autocompletion is always nice , so, shouldn't it be included in the runit installation ? 1 Likes
Re: [Feature request] Bash-completion for runit sv Reply #3 – 24 May 2022, 19:33:04 Just added it, avoid necroposting please. 2 Likes
Re: [Feature request] Bash-completion for runit sv Reply #4 – 24 May 2022, 19:54:16 great, thanks @qontinuum (sorry for necro posting, i thought it was better to answer here than an other post saying the same thing)
Re: [Feature request] Bash-completion for runit sv Reply #5 – 24 May 2022, 23:04:50 Quote from: qontinuum – on 24 May 2022, 19:33:04Just added it, avoid necroposting please.Thanks! You rock!