Skip to content

style(_comp_compgen): call _comp_compgen_filedir directly #964

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

Merged
merged 3 commits into from
May 7, 2023

Conversation

akinomyoga
Copy link
Collaborator

@akinomyoga akinomyoga commented May 7, 2023

I think it's easy enough to remember that if no _comp_compgen features are needed, calling _comp_compgen_FOO directly is ok (and preferred) for efficiency. So I guess that's what I'd prefer, but whatever we go with would be good to be documented somewhere, e.g. in the style guide, or the related function commentary.

Originally posted by @scop in #954 (comment)

The change _comp_compgen filedir => _comp_compgen_filedir is another large one and makes the GitHub interface unuseful, so I decided to separate the PR for it.

Originally posted by @akinomyoga in #954 (comment)


c91e6c4 is the rewrite.

I'm including the variable name changes in _comp_compgen_filedir to avoid conflicts that can be introduced when _comp_comgen -v var filedir is used (08477b4).

but whatever we go with would be good to be documented somewhere, e.g. in the style guide, or the related function commentary.

I added a @remarks in the function code document (ea3a88e) but haven't added it to the style guide. It seems even usage of xfunc is currently undocumented in doc/*.md, so it is consistent to describe both _comp_xfunc and _comp_compgen if we are to add commentary of the _comp_compgen usage in the style guide.

Copy link
Owner

@scop scop left a comment

Choose a reason for hiding this comment

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

Thanks!

@scop scop merged commit 1930f81 into scop:master May 7, 2023
@akinomyoga akinomyoga deleted the filedir branch May 7, 2023 16:08
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 8, 2023
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 10, 2023
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 21, 2023
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 21, 2023
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 26, 2023
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 28, 2023
akinomyoga added a commit to akinomyoga/bash-completion that referenced this pull request May 28, 2023
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.

2 participants