Skip to content

feat: no empty command completion if no_empty_cmd_completion is on #978

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 8 commits into from
Jun 3, 2023

Conversation

scop
Copy link
Owner

@scop scop commented May 12, 2023

On some systems, generating the entire list of available commands takes a long time. no_empty_cmd_completion is semantically close enough to piggyback on it here.

Closes #926

@scop scop marked this pull request as draft May 12, 2023 06:51
@scop scop force-pushed the feat/no-empty-cmd branch 3 times, most recently from 95db0b3 to 2a20305 Compare May 26, 2023 07:31
@scop scop marked this pull request as ready for review May 26, 2023 07:31
Copy link
Collaborator

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

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

There are some other cases where we might suppress command name generations on empty completions.

./bash_completion:2497:        _comp_compgen -- -d -c
./completions/_su:23:            _comp_compgen -- -d -c
./completions/gdb:23:            _comp_compgen -- -d -c

Currently, _comp_compgen_commands only generates the command names, but maybe it could also generate directories by plusdirs by default.

@scop
Copy link
Owner Author

scop commented May 28, 2023

Good points. Added -o plusdirs and addressed the noted remaining ones.

The note in gdb completion regarding bash builtins etc being include is valid for quite a few other things as well, that's something we may want to address sometime.

scop and others added 6 commits June 1, 2023 21:37
On some systems, generating the entire list of available commands takes
a long time. `no_empty_cmd_completion` is semantically close enough to
piggyback on it here.

Closes #926
It makes sense to offer completions from explicitly specified paths,
too.

Thanks-to: Koichi Murase <myoga.murase@gmail.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
@scop scop force-pushed the feat/no-empty-cmd branch from 2e9e226 to c8b9830 Compare June 1, 2023 18:37
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
@scop scop merged commit 77074a9 into master Jun 3, 2023
@scop scop deleted the feat/no-empty-cmd branch June 3, 2023 05:21
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.

Long lag when completing the command argument of ssh
2 participants