-
Notifications
You must be signed in to change notification settings - Fork 383
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
base: main
Are you sure you want to change the base?
Conversation
_command_offset $i | ||
return | ||
fi | ||
[[ ${words[i]} == -@(!(-*)[uCLs]) ]] && |
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.
What's the difference between what you wrote and my suggestion below? They both seem to work, but my suggestion seems simpler.
[[ ${words[i]} == -@(!(-*)[uCLs]) ]] && | |
[[ ${words[i]} == -@([uCLs]) ]] && |
done | ||
|
||
case "$prev" in | ||
-!(-*)u) |
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.
Same as above; I simply use -u
and -C
in my personal doas completion file.
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.
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.
Makes sense, thanks for the explanation!
|
Fix #505