-
Notifications
You must be signed in to change notification settings - Fork 391
feat: add 3rd party generated completion fallbacks #905
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
Conversation
In order to be able to wrap loading 3rd party completions in enable+reset posix mode. #904 (comment)
They are not always necessarily deprecated, but can serve as fallbacks due to other reasons.
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 |
There was a problem hiding this comment.
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.
Per the note in CONTRIBUTING.md, #905 (comment)
There was a problem hiding this 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.
Per #904