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
UCM bash/zsh completion support #2467
Comments
Thanks for the tip, @ChrisPenner! And also for the switch to optparse applicative. I don't know much about Homebrew, but I set this up in the Nix derivation for
|
I just realized that we can also auto-generate a not-completely-terrible man page for
Output
|
Built January 1, 1980? |
Haha. My guess would be that this has to do with git or Nix normalizing a date for reproducibility/consistent hashing. But I have no idea why it would differ from what's at the top of the page. |
I found an example of a project that installs shell completion as part of its homebrew formula. I don't know homebrew or Ruby well enough to understand whether the homebrew formula could call into ucm to generate these files as part of the installation. Or would they need to be bundled into the tar file? Does anyone who uses homebrew want to give this a try? This is the Homebrew formula that you'd need to change. |
ChrisPenner commentedOct 6, 2021
•
edited
In #2280, I swapped ucm to use optparse applicative, which means we can now get Bash, Zsh, or Fish tab-completion on arguments and commands for free! This also allows configuring custom completion types within the CLI code, and if you use the appropriate parser type for arguments it can infer that a given argument must be a file or directory, etc.
You can read about it here, but I believe all that we need to do is:
ucm
executable with the following commands as part of the release process:ucm --zsh-completion-script $(which ucm) > zsh_completion.sh
ucm --bash-completion-script $(which ucm) > bash_completion.sh
The text was updated successfully, but these errors were encountered: