-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
programmatic shell completions #8043
Conversation
9052c4e
to
d1e54d3
Compare
So... an alternative would be to add a "complete me" command to go-ipfs so you could pass |
}) | ||
sort.Slice(parsed.ShortOptions, func(i, j int) bool { | ||
return parsed.ShortOptions[i] < parsed.ShortOptions[j] | ||
}) |
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.
you can use sort.Strings for all four of these
Nothing stands out to me with the shell, but I haven't properly reviewed it - I've never written completion scripts by hand :) |
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.
Generally looks great, excellent work!!!!
A bit annoying that the indentation of the various blocks is all over the place / makes it hard to reason about at first look, but this is not really for human consumption anyway.
Left a single suggestion in the "how to use this" section, good to ship as is without considering it.
d1e54d3
to
7940371
Compare
These are missing some of the features of the current hand-rolled completions, but they:
fixes #4551
fixes #8033