Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.ac: Use standard --with-bash-completion-dir option #174

Closed
wants to merge 1 commit into from
Closed

configure.ac: Use standard --with-bash-completion-dir option #174

wants to merge 1 commit into from

Conversation

thesamesam
Copy link

@thesamesam thesamesam commented Jul 17, 2021

Rationale:
This makes it a lot easier to enable/disable installation
of bash completion files rather than it being based on
a certain package being installed (or not). It's useful
in Gentoo Linux for example where we may want to always
install Bash completion files to the right location, even
if the user isn't using it yet, to save rebuilds.

This makes a few changes to the current Bash completion logic, mainly:

  • Falls back gracefully to a standard directory if bash-completion
    itself is not installed (in that case, we can't ask it via pkgconfig
    where to place files).

  • So the behaviour is now:

    • no argument / --with-bash-completion-dir=yes:

      Asks pkgconfig, but falls back to standard directory.

    • --with-bash-completion-dir=dir:

      Use the given directory with no detection.

    • --without-bash-completion-dir:

      No installation of Bash completion files.

Signed-off-by: Sam James sam@gentoo.org

@thesamesam
Copy link
Author

ping

@mattst88
Copy link

Cc: @stellarhopper

Please don't ignore pull requests.

@stellarhopper
Copy link
Member

@thesamesam @mattst88 Sorry I missed this. The change makes sense - I'll pull it in manually (for signoff reasons) and queue it for v73. Thank you.

@mattst88
Copy link

mattst88 commented Jan 4, 2022

Thanks!

Rationale:
This makes it a lot easier to enable/disable installation
of bash completion files rather than it being based on
a certain package being installed (or not). It's useful
in Gentoo Linux for example where we may want to always
install Bash completion files to the right location, even
if the user isn't using it yet, to save rebuilds.

This makes a few changes to the current Bash completion logic, mainly:
* Falls back gracefully to a standard directory if bash-completion
  itself is not installed (in that case, we can't ask it via pkgconfig
  where to place files).

* So the behaviour is now:
  * no argument / --with-bash-completion-dir=yes:

    Asks pkgconfig, but falls back to standard directory.

  * --with-bash-completion-dir=dir:

    Use the given directory with no detection.

  * --without-bash-completion-dir:

    No installation of Bash completion files.

Signed-off-by: Sam James <sam@gentoo.org>
@thesamesam
Copy link
Author

  1. Thank you!
  2. Added sign off (sorry, normally I do it by default)

@stellarhopper
Copy link
Member

stellarhopper commented Jan 6, 2022

@thesamesam Actually I think the meson conversion series @djbw just posted [1] a new version of already implements your proposed behavior, and that is destined for v73. I think we can simply move to the meson conversion, but I'd appreciate if you took a moment to verify that works for you. Thanks!

@thesamesam
Copy link
Author

@stellarhopper Thank you! Not runtime tested but by eye, that does exactly what I was hoping/expecting it to. I'll close this PR and let you know if there's any trouble once the Meson port lands 😉.

Thanks again.

@thesamesam thesamesam closed this Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants