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

misc: Improve and amend bash completion feature #1973

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

Conversation

kangtegong
Copy link
Contributor

@kangtegong kangtegong commented Sep 23, 2024

This PR improves and modifies the bash completion feature,
by appling patch from @mug896 and relocate bash completion script path based on pkg-config.

This PR makes bash completion feature works correctly
even when installed with the --prefix as follows.

$ configure --prefix=<prefix_dir>
$ make
$ make install

For your information, the bash completion feature does not apply immediately after the installation,
but apply immediately after source or after terminal is refreshed.

source /usr/share/bash-completion/completions/uftrace

mug896 and others added 2 commits September 23, 2024 13:24
Resolved issues with the current bash-completion.sh script:
1. Options are now properly listed, starting with "-" or "--".
2. Files from the current directory and subcommands are no longer
   incorrectly included in the completion listing.

Fixed: namhyung#873

Signed-off-by: Hyunho Cho <[email protected]>
Signed-off-by: Kang Minchul <[email protected]>
Adjusted the `configure` script for improved quoting and proper handling of
bash completion directory based on `pkg-config` detection.

The recommended directory is completionsdir,
which can be obtained like below [1]:

  $ pkg-config --variable=completionsdir bash-completion

[1] https://github.com/scop/bash-completion#faq

Signed-off-by: Kang Minchul <[email protected]>
@kangtegong kangtegong changed the title Improve/Amend bash completion feature Improve and amend bash completion feature Sep 24, 2024
@kangtegong kangtegong changed the title Improve and amend bash completion feature misc: Improve and amend bash completion feature Sep 24, 2024
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.

2 participants