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

feat(doas): new completion #766

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat(doas): new completion #766

wants to merge 1 commit into from

Conversation

aarchetype
Copy link

Fix #505

_command_offset $i
return
fi
[[ ${words[i]} == -@(!(-*)[uCLs]) ]] &&

Choose a reason for hiding this comment

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

What's the difference between what you wrote and my suggestion below? They both seem to work, but my suggestion seems simpler.

Suggested change
[[ ${words[i]} == -@(!(-*)[uCLs]) ]] &&
[[ ${words[i]} == -@([uCLs]) ]] &&

done

case "$prev" in
-!(-*)u)

Choose a reason for hiding this comment

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

Same as above; I simply use -u and -C in my personal doas completion file.

Copy link
Owner

@scop scop Apr 16, 2024

Choose a reason for hiding this comment

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

That will fail to match the case where u or C is the last in a set of bundled short options, like doas -nu <TAB>. Similarly above.

@Tachi107
Copy link

Tachi107 commented Apr 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding doas support.
4 participants