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

Control valid flag start for commands #327

Closed
albfan opened this issue Jul 11, 2015 · 2 comments
Closed

Control valid flag start for commands #327

albfan opened this issue Jul 11, 2015 · 2 comments

Comments

@albfan
Copy link

albfan commented Jul 11, 2015

On git for windows "/" is not a start of flag, and it is used to locate branches on remotes "origin/master" "origin/develop"

It would be helpful to control which characters are allowed to be start of flag.

I guessed that this can be controlled on parser definition so I tried:

albfan/clink-completions@ae213b3

but this leads to an error:

C:\Users\vagrant\AppData\Local.\clink\git.lua:218: attempt to index local 'parser' (a function value)

I'm totally newbie to lua. What is the correct syntax to override is_flag(), is that possible?

Another approach is to recompile clink. I do not use window toolchain so I try with mingw

https://github.com/albfan/clink

by now I have installed mingw 32 using this branch:

https://github.com/albfan/clink/commits/wip

If I manage to install mingw64 or tweak clink.bat to use 32bits instead of machine platform I confident this tweak should work. If I'm right and you find this interesting I guess clinks should be configurable at that point. Something like:

parser:disable_window_flag_style()

would be helpful for a lot of command line tools.

@albfan
Copy link
Author

albfan commented Jul 13, 2015

These analysis is totally wrong. autocomplete for remote branches is solved here

albfan/clink-completions@1f02095

@albfan albfan closed this as completed Jul 13, 2015
@mridgers
Copy link
Owner

👍

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

No branches or pull requests

2 participants