Commit Graph

10 Commits

Author SHA1 Message Date
William Hubbs 917a7031d9 remove the openrc-service-script bash completion
Bash completion has two official completion directories:

- completionsdir, a lazy loading mechanism
- compatdir, an eager loading mechanism

Modern style is to use lazy loading if possible. It is modern
technology, speeds up your shell by deferring loads, and is generally
recommended for applications to prefer by default. It requires you name
your completion script using the same name as the command to complete.
Every distro prefers you do this, but only because bash-completion
itself does.

The openrc-service-script completion doesn't provide a completion for a
command called openrc-service-script. It cannot use the lazy loading
mechanism and emits a warning in Gentoo's policy lints as a result.
Installing to the completionsdir is therefore a useless no-op. Better to
install nothing.

The compatdir is the correct location for completions that cannot be
lazy loaded and must be loaded at shell startup in order to correctly
register themselves for a globbed list of commands that can only be
ascertained dynamically at shell startup. The alternative is to have
every command that can be globbed install a symlink to
openrc-service-script, and install openrc-service-script to a third
location.
2024-06-28 14:41:24 -05:00
William Hubbs 4dfec917cc Fix install location of openrc-service-script bash completion
X-Gentoo-Bug-URL: https://bugs.gentoo.org/925409
2024-06-25 17:30:43 -05:00
Jernej Jakob cd53239701 bash-completion/rc-service: don't set or unset extglob
It breaks bash-completion.
It's not necessary to set extglob as patterns in '[[' after '=='
are always matched as if extglob were set.

Closes: #636
Signed-off-by: Jernej Jakob <jernej.jakob@gmail.com>
2023-07-26 22:41:19 -05:00
NRK 36cc40a9d6 bash-completions/rc-service: don't use grep
Co-authored-by: Mike Frysinger <vapier@gentoo.org>
Closes: https://github.com/OpenRC/openrc/issues/344
2023-02-02 19:37:09 -05:00
William Hubbs 391d12db48 migrate fully to meson build system
- drop old build system
- move shared include and source files to common directory
- drop "rc-" prefix from shared include and source files
- move executable-specific code to individual directories under src
- adjust top-level .gitignore file for new build system

This closes #489.
2022-04-06 10:51:55 -05:00
William Hubbs 21d81ea5a9 build: always add subdirs 2021-12-30 12:17:47 -06:00
Mike Frysinger 301161a7a4 use HEAD in git URIs to point to the default branch
This makes the URIs shorter and dynamic: whatever the default branch
the repo uses will be used.
2021-12-20 20:07:00 -05:00
William Hubbs 7c29fbd36f build: install bash and zsh completions 2021-09-07 12:45:53 -05:00
William Hubbs 7e95d924c9 bash-completions/rc-service: allow tab to be used again
X-Gentoo-Bug: 670290
X-Gentoo-Bug-URL: https://bugs.gentoo.org/670290
2018-12-27 16:31:15 -06:00
William Hubbs d220fc2723 add bash completion support
This fixes #188.
2017-12-06 13:25:26 -06:00