Bash/zsh completion for s6-rc (requires version 0.5.3.3 or later) 22 January 2023, 02:16:44 With v0.5.3.3, Skarnet released the fix to an oversight that prevented s6-rc from reading data about system services as a non-root user. Now, bash completion scripts for s6-rc are finally possible.I've written this script in 2022, but felt most users wouldn't benefit if they had to manually change the PKGBUILD to backport the fix.I made sure it handles the -l and -c options given for the s6-rc programs for accurate completions even when working with user services. s6-rc -l /run/$USER/s6-rc change <TAB> (if you followed the guide on the wiki) will only show your user services.See attached gifs for examples of it in action.Installation instructions1. Clone the repo with the completion scripts: https://github.com/capezotte/s6-shell-completion2.b. For bash, source bash/s6-rc.bash the end of your .bashrc.2.z. For zsh, ln -s "$PWD/zsh/s6-rc" ~/.local/share/zsh/functions/s6-rc, and restart zsh (a simple exec zsh should suffice). Last Edit: 21 May 2024, 01:08:36 by capezotte 1 Likes
Re: Bash-completion for s6-rc (requires version 0.5.3.3 or later) Reply #1 – 20 May 2024, 21:10:29 I've made zsh completions as well, and created a new git repository containing both:https://github.com/capezotte/s6-shell-completionInstall instructions are still the same for bash (clone and source s6-rc.bash). For zsh, symlink zsh/s6-rc to ~/.local/share/zsh/functions. 1 Likes
Re: Bash/zsh completion for s6-rc (requires version 0.5.3.3 or later) Reply #2 – 10 June 2024, 15:46:57 Scripts have been updated to offer the POSIX process group management switches.