-
Notifications
You must be signed in to change notification settings - Fork 382
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
fix(__load_completion): do not warn when completing .
first time
#776
Conversation
542e9d3
to
4cea6c8
Compare
I have a naive question. Do we need to output warnings here? Maybe we can just ignore the directories because the warning message disturbs the cursor positions in the terminal. |
#506 has the discussion related to this. I'm not that concerned about messing with the output; this is a broken setup that should be fixed and not masked, consistent with what happens with a completion file with invalid syntax, or an unreadable one. |
Thank you for your explanation. Then, that's fine to keep the error message. Maybe we can also explicitly mention in the error message that putting subdirectories in |
As mentioned in the commit message, the current warning mimics what bash itself would emit when sourcing a directory. If we keep it that way, there will be minimal behavioral changes ahead for users when the day comes we can drop our own |
ca361be enables warnings about trying to source directories when loading completions. That's useful, but triggers the errors in the common case of trying to source something, `. <TAB>`. Special case `.` (and for completeness, even though not that interesting, `..`) so we don't issue the warning about them. Closes #703
4cea6c8
to
017fb55
Compare
Thank you! I see the background! Please merge it as is. |
Done, along with 16ce83f documenting the bash version needing the check (verified locally, didn't bother to check 4.2.x patch versions). |
ca361be enables warnings about trying to source directories when loading completions. That's useful, but triggers the errors in the common case of trying to source something,
.
TabSpecial case
.
(and for completeness, even though not that interesting,..
) so we don't issue the warning about them.