Skip to content
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(_comp_command_offset): fix offset mismatching for words vs COMP_WORDS (use words) #860

Merged
merged 3 commits into from May 1, 2023

Conversation

akinomyoga
Copy link
Collaborator

Fixes #722.

This fixes it the other way around as #802. Now _comp_command_offset receives the index in words instead of that in COMP_WORDS.

@akinomyoga akinomyoga changed the title Command offset offset mismatch fix(_comp_command_offset): fix offset mismatching for words vs COMP_WORDS (use words) Dec 17, 2022
@akinomyoga akinomyoga force-pushed the _command_offset-offsetMismatch branch 3 times, most recently from 32f077e to 25d5f8f Compare December 17, 2022 17:44
@akinomyoga
Copy link
Collaborator Author

I have rebased it on top of the latest master and added adjustments to the existing interfaces in commit 25d5f8f.

completions/find Show resolved Hide resolved
completions/sudo Outdated Show resolved Hide resolved
bash_completion Outdated Show resolved Hide resolved
@akinomyoga akinomyoga force-pushed the _command_offset-offsetMismatch branch 2 times, most recently from 6251f46 to e1ace64 Compare April 29, 2023 07:20
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! Seeing the examples in the tests makes it clearer to me to understand what's going on.

Added some comment suggestions, pre-approved + feel free to merge when the conflicts are resolved.

bash_completion Outdated Show resolved Hide resolved
bash_completion.d/000_bash_completion_compat.bash Outdated Show resolved Hide resolved
bash_completion.d/000_bash_completion_compat.bash Outdated Show resolved Hide resolved
@akinomyoga akinomyoga force-pushed the _command_offset-offsetMismatch branch from 750a244 to bfc752b Compare May 1, 2023 05:19
@akinomyoga
Copy link
Collaborator Author

akinomyoga commented May 1, 2023

I have applied the suggested changes to the code comments and squashed them into the corresponding commit. I added an additional adjustment as follows:

@akinomyoga akinomyoga force-pushed the _command_offset-offsetMismatch branch from bfc752b to d9aed51 Compare May 1, 2023 05:23
@akinomyoga akinomyoga force-pushed the _command_offset-offsetMismatch branch from d9aed51 to 06bfe23 Compare May 1, 2023 05:26
@scop scop merged commit 5c19025 into scop:master May 1, 2023
7 checks passed
@akinomyoga akinomyoga deleted the _command_offset-offsetMismatch branch May 1, 2023 08:48
@akinomyoga
Copy link
Collaborator Author

Thanks.

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.

Completing sudo after --user= doesn't suggest commands
2 participants