Skip to content

Commit

Permalink
remove the openrc-service-script bash completion
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
williamh committed Jun 28, 2024
1 parent 5f973a6 commit 5e50c57
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
3 changes: 0 additions & 3 deletions bash-completion/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ bash_completions = [

install_data(bash_completions,
install_dir : get_option('datadir') / 'bash-completion/completions')
install_data(
'openrc-service-script',
install_dir : get_option('sysconfdir') / 'bash_completion.d')
endif
29 changes: 0 additions & 29 deletions bash-completion/openrc-service-script

This file was deleted.

0 comments on commit 5e50c57

Please sign in to comment.