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

feat: add 3rd party generated completion fallbacks #905

Merged
merged 15 commits into from Mar 26, 2023
Merged

Conversation

scop
Copy link
Owner

@scop scop commented Mar 23, 2023

Per #904

completions/_gh Outdated Show resolved Hide resolved
So that things work also for commands preceded by a backslash.

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
@@ -2567,7 +2567,7 @@ __load_completion()
# Do not warn with . or .. (especially the former is common)
[[ $compfile == */.?(.) ]] ||
echo "bash_completion: $compfile: is a directory" >&2
elif [[ -e $compfile ]] && . "$compfile"; then
elif [[ -e $compfile ]] && . "$compfile" "$cmd"; then
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is something we could consider adding a test for, but I'm not sure if it's worth the trouble.

Also not sure about adding tests for the the actual completions as their result varies depending on if the generating command is installed or not.

Copy link
Collaborator

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for adding or not adding the tests, either works for me.

@scop scop merged commit df8cdda into master Mar 26, 2023
7 checks passed
@scop scop deleted the feat/3rd-party branch March 26, 2023 21:10
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

2 participants