-
Notifications
You must be signed in to change notification settings - Fork 26
Add tab completion script for zsh and fix bash completion for ABS services #90
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
Conversation
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.
Just some feedback on the util function for printing. Haven't tested the zsh completion or anything.
a66112f
to
95266d8
Compare
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.
Looks good to me from a code perspective :) 👍
@puppetlabs/dio if you all have write access would you mind reviewing/merging when you have a chance? |
Overall this looks good to me @scotje but I do have one minor request: please update https://github.com/puppetlabs/vmfloaty#tab-completion to include your new zsh bit. Oh, and really sorry I am just now getting to reviewing this! You are always welcome to ping in our slack channel for things like this too. |
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.
The --hostnameonly
flag is a nice general addition. Perhaps a fish shell completion script is coming soon? 😆
Previously this option had no effect on the output. This commit makes the option effective and also refactors the tests for this method to cover this case.
Adds an option to the `floaty list` subcommand so that, when listing active hosts, floaty will output just the hostnames, without any additional information or formatting. Hostnames will be separated by a newline. This functionality is primarily intended for consuming by tooling (such as the tab completion scripts).
This commit adds a new tab completion script for zsh. It also fixes the completion script for bash to work with ABS backends.
95266d8
to
8546c1c
Compare
I rebased this and fixed the tests up as best I could but ran out of time to completely figure out how the default output format of ABS hosts had changed and what I needed to mock out to make those tests pass. If someone has time to fix the tests and wants to re-push this to a new PR, I'm fine with that. Otherwise I can take another look tomorrow. |
ABS now returns the ABS job_id on the first line, then every vmpooler hostname indented. It queries them from vmpooler to get the metadata like lifetime etc
yes looking into fixing the tests now |
are returned by ABS. Added test with vmpooler and nspooler result
I also found a bug and corrected it so that hybrid requests to ABS (vmpooler, nspooler) can pretty print the hostnames properly.
|
Status
Ready for Merge
Description
Adds a new
--hostnameonly
option tofloaty list
to serve as more reliable plumbing for the completion scripts, then updates the bash completion script to use that option and implements a new zsh completion script with equivalent functionality to the bash script.Reviewers
@puppetlabs/dio
@highb
@briancain