void-linux / runit

The init system for Void Linux.
https://voidlinux.org
162 stars 22 forks source link

completions: add SVDIR support for zsh #15

Open crater2150 opened 3 years ago

crater2150 commented 3 years ago

Moved from void-linux/void-packages#28790

Allows sv's completion to complete other service directories, e.g. for per-user services. If the $SVDIR environment variable is set and sv isn't used with sudo, the completion is changed to complete services from $SVDIR. Otherwise behaviour is unchanged.

I currently have only implemented the change for zsh. In bash, the sudo completion modifies variables so that the completion of the following command doesn't "see" the sudo in the beginning. I'm still looking for ways to detect sudo in bash.