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

lib/bourne-shell.sh: Don't force-load bash-completion #572

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on May 16, 2024

  1. lib/bourne-shell: Do not load bash-completion

    It's already done better by the "system" completion module, and doing
    it there too makes disabling it impossible and debgging issues harder.
    ifireball authored and akinomyoga committed May 16, 2024
    Configuration menu
    Copy the full SHA
    ebb8c36 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f4c84c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3a03814 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8ed02a8 View commit details
    Browse the repository at this point in the history
  5. fix(completions/system): load bash-completion only once

    We have been sourcing bash-completion as many times as the number of
    the installations and entry points that we can find.  However, only
    one instance of bash-completion is enough.
    
    We also re-order the detection to adjust the precedence.
    akinomyoga committed May 16, 2024
    Configuration menu
    Copy the full SHA
    fcce66a View commit details
    Browse the repository at this point in the history
  6. feat(completions/system): integrate bash-completion loader in lib/bou…

    …rne-shell
    
    The search that has been in lib/bourne-shell.sh is slightly different
    from that in completions/system.completion.sh.  We integrate the
    former into the latter.
    
    * We add a search location
      `/usr/share/bash-completion/bash_completion` for bash-completion.
      This is the standard location for bash-completion v2.  We have been
      only checking /etc/bash_completion which is bash-completion v1.
    
    * We also add a guard for the POSIX mode.  Older versions of
      bash-completion have an issue with the POSIX mode.  In particular,
      bash-completion v1 can only be used with with the macOS Bash 3.2,
      but bash-completion v1 does not work well in the POSIX mode.
    
    * We also add a guard for already loaded bash-completion.  Other
      system configuration might already load bash-completion.  We skip
      loading bash-completion when we detect an existing bash-completion
      settings in tbe current shell environment.
    akinomyoga committed May 16, 2024
    Configuration menu
    Copy the full SHA
    d291140 View commit details
    Browse the repository at this point in the history