-
Notifications
You must be signed in to change notification settings - Fork 391
refactor(bash_completion): rename _get_comp_words_by_ref
, etc.
#886
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
Thanks for this and for considering #870. I completed the "load eagerly (additionally) from in-tree bash_completion.d dir for in-tree setups" TODO in it so we don't lose any functionality temporarily. Agreed the remaining TODOs in it can be addressed separately afterwards. |
084fe69
to
bab3f8d
Compare
* refactor: `{ => _comp}_upvars` * refactor: `{ => _comp}__reassemble_comp_words_by_ref` * refactor: `{ => _comp}__get_cword_at_cursor_by_ref` * refactor: `{ => _comp}_get_comp_words_by_ref`
bab3f8d
to
fac177a
Compare
* rename `_comp_get{_comp => }_words{_by_ref => }` * rename `_comp__reassemble{_comp => }_words{_by_ref => }` * rename `_comp__get_cword_at_cursor{_by_ref => }`
fac177a
to
e76ca14
Compare
I have rebased it. I also moved the deprecated function It seemed e76ca14 is a suggestion for simplifying the function names. |
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.
Nice!
Mainly for easy allowlisting and backup avoidance in pre-commit configs. #886 (comment)
I like this, implementation with just |
Mainly for easy allowlisting and backup avoidance in pre-commit configs. #886 (comment)
I had some pending changes for the naming convention in
bash_completion
, but let me submit it now.One thing that I haven't yet decided is whether to strip
_by_ref
from the new names or not. I think the suffix_by_ref
is added to differentiate them from the older versions that output the result to stdout. Now we deprecated these older versions and wouldn't try to prepare the new names_comp_*
for these deprecated functions, so there is no need for the differentiation anymore. But perhaps it might still be better to keep the suffix to remind us of the unique convention of these functions that receive variable names in the arguments.