adfinis / timedctl

GNU Affero General Public License v3.0
5 stars 0 forks source link

add shell completions to PKGBUILD #87

Closed c0rydoras closed 1 year ago

c0rydoras commented 1 year ago

something like this:

package() {
  cd "${srcdir}/timedctl"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  _TIMEDCTL_COMPLETE=bash_source timedctl | install -Dm0644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/timedctl.bash"
  _TIMEDCTL_COMPLETE=fish_source timedctl | install -Dm0644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/timedctl.fish"
  _TIMEDCTL_COMPLETE=zsh_source timedctl | install -Dm0644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_timedctl"
}