-
Notifications
You must be signed in to change notification settings - Fork 588
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
[WIP] Add tab-completion for powershell and bash #2157
Conversation
I try to not use powershell as much as possible, but I'm fine with adding this to this repository. But we definitely would need a page to explain how people can use this. Also can we somehow ensure that if we add new CLI arguments we do not forget to update this powershell script? |
I dont think there is an easy way to enforce that. The approach that the dotnet-cli is taking is kinda neat. The library that parses the commandline-arguments also creates suggestions, so the shell scripts only have to ask for them. (https://github.com/dotnet/CliCommandLineParser) So in short, i guess that is just discipline, like adding documentation for modules. |
I'm unsure as to how many people actually call fake directly Vs using a script. |
@BlythMeister with fake 5 it makes much more sense now to use fake directly. Personally I always install globally and use that. Maybe we even add some fallback feature to use the local fake runtime version in the future |
Hmm I guess I'm more concerned about repeatable builds because of legacy branching rather than trunk based. |
@BlythMeister I guess I differentiate between CI and local builds. Locally it is nice to just |
7a9254e
to
ce4ac5b
Compare
Is this ready? or rather what is missing? |
Sorry, i forgot to write a comment after i pushed. |
- add completion for commands, options and targets in bash - update documentation for command-line-completion to include bash - update installation instructions for completions
I added a completion file for bash. I could only test it in git-bash though. It would be nice if someone could have another look. I am also not 100% sure if the installation instructions work on every system, because i could not test them :/. |
Just installed the bash version and it looks quite good. There is no completion for targets and Nevertheless I think it is already quite good so we can fix those issues as we go forward. |
I had a look at the git completion where you also have to write -- to complete arguments. Otherwise it will default to commands e.g add, commit etc. I am not sure what the UNIX default is there. When i write fake build target and double tab i get a list of targets. That list is somewhat wrong though :/. I forgot to handle targets with descriptions. |
@kblohm Yes sorry just tested it again and it works, I just was in another directory and then you just get the default completion (list of files) |
Hi,
I tried to add some basic tab-completion for powershell.
This does probably not cover all the possibilities, but as far as i can tell it works fine for everything i tried.
Sometimes i feel like the fake-cli help is not super useful, so i might have missed some things.
One other painpoint is completion for targets. The --list argument needs to first download and build everything, so it might take a little while when he build never ran before.
I am not very firm in powershell-scripting, so i dont know if this is the right approach. I just looked how other people did something similair. Feedback is appreciated :).
There is no documentation yet, because i am not sure how useful this is or if you even want this in this repo. I could add some later though.