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

Argmatchers should color -x:"foo" as a flag if -x: is a flag #62

Closed
chrisant996 opened this issue Jan 23, 2021 · 1 comment
Closed

Argmatchers should color -x:"foo" as a flag if -x: is a flag #62

chrisant996 opened this issue Jan 23, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@chrisant996
Copy link
Owner

When "-x:" is a known flag, then -x:"foo" should color -x: in the Flag color and foo in the Other color.
When "-x:" is not a known flag, then no special handling is needed; default coloring is appropriate.

@chrisant996 chrisant996 added the enhancement New feature or request label Jan 23, 2021
chrisant996 added a commit that referenced this issue Jan 28, 2021
Clink 0.4.9 accidentally interpreted the next part as the next arg
position.  But that's because Clink and Readline got out of sync about
which word was being completed.

Clink 1.x didn't do any completion.  Although that was actually the
intended behavior, I want to strike a balance between compatibility and
reasonable behavior.

So now Clink recognizes the `-x:` flag syntax and does file completion,
and also colors the whole argument as a flag, regardless what follows
the `:` or `=` character.  To generate other matches, a lua script can
register a generator and provide code to handle the case.

This fixes issues #61 and #62.
@chrisant996
Copy link
Owner Author

Fixed by 05d4daa.

@chrisant996 chrisant996 changed the title Argmatchers should color -x:"foo" so that -x: is Flag color Argmatchers should color -x:"foo" as a flag if -x: is a flag Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
-