-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add completion command #628
Conversation
command.Register(cmd) | ||
} | ||
|
||
var bash = `# bash completion for step |
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.
Can we read these values from the ./autocomplete/xxx
files? Otherwise we'll have to keep these updated in two places.
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.
There two options here:
- Phase out the files in autocomplete and change all installation scripts to use the command instead.
- Symlink the files inside the package and use something like embed to access them.
I'm leaning towards option 1. What do you think?
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.
I do like option 1 but I wonder if that will break other people's automation. I really don't know how people are installing step
but if they expect those files to be present (as we do in our debian files and our Makefile) then they'll run into issues.
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.
We could keep them for a while and transition everything towards the command, and at some point later remove them. The completion scripts are very unlikely to change, so we wouldn't worry about them diverging.
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.
I like that idea.
The places that I think we need to update:
- .goreleaser.yml
- debian/step-cli.bash-completion
- make/bundle.sh
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.
We can add a README in the autocomplete dir that says those files are deprecated and the source of truth in the future will be step completion <shell>
.
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.
Sounds good. Should I do them in this PR?
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.
Please, if you wouldn't mind. I know they're not "directly related" to your initial issue.
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.
It's ready now. @dopey
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.
see comments
Trying out the debian build in a tagged release candidate. Assuming that works, will merge. |
Fixes #622
Description
Add shell completion command. #622
I removed the
-o nospace
fromautocomplete/bash_autocomplete
. I think it's far better.