-
Notifications
You must be signed in to change notification settings - Fork 391
refactor(bash_completion): rename functions _userland
, _sysdirs
, _have
, and _rl_enabled
#735
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
4bc7856
to
5f5a32c
Compare
I wouldn't worry about that -- we can process things in small chunks, that way they are easier to review. |
Thank you for the review!
Now, I agree with it because I seem to have many things to discuss in the refactoring. I think I'd like to separate the PRs. I will change the PR subject. Maybe I could have just changed the function names by blindly prefixing |
c080a00
to
d14308a
Compare
bash_completion
_userland
, _sysdirs
, _have
, and _rl_enabled
I have rebased it. I have decided to narrow the scope of this PR to these 5 functions and update the PR subject. Now this is ready for review. Another thing related to the function naming is about Edit: Also, if you want to do any changes/renaming for other functions in |
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.
Left a few comments, feel free to address the way you prefer or not, pre-approved either way.
bash_completion
Outdated
# This function checks whether we have a given program on the system. | ||
# | ||
_have() | ||
_comp_has_command() |
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 would personally go with _comp_have_command
for this -- the "has" makes it read like asking if completion has a command which is not what we're "asking" with this. _comp_have_command
sounds just less odd to me. But not a biggie/blocker, leaving up to you.
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.
Thank you for the comment. I have switched to _comp_have_command
bash_completion
Outdated
} | ||
|
||
# This function checks whether a given readline variable | ||
# is `on'. | ||
# | ||
_rl_enabled() | ||
_comp_rl_enabled() |
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 was contemplating _comp_is_rl_enabled
for this, but I think it's better as _comp_rl_enabled
.
Then again there's little reason to keep it this short, perhaps _comp_readline_variable_on
or _comp_readline_variable_enabled
(or "variable" shortened to "var" in either) would be better.
Again, leaving up to you to decide.
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 adopted _comp_readline_variable_on
.
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
edf207f
to
cbc0211
Compare
cbc0211
to
fffc188
Compare
Maybe does pre-approved mean that I'm supposed to merge it when I decided on the points raised in these comments? |
Yes, that's what I meant, apologies for being unclear (and again taking such a long time to get back to this!). I'll go ahead and merge now, thanks! |
Thank you! I'll keep it in mind from now on! |
_comp_xfunc
#734 (_comp_xfunc
)