Skip to content
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

ci: add autocompletion and manpage #177

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Conversation

jon4hz
Copy link
Contributor

@jon4hz jon4hz commented Dec 26, 2022

This adds support for the automatic generation of shell autocompletion files and linux manpages.

@jon4hz
Copy link
Contributor Author

jon4hz commented Dec 27, 2022

927b0b3 also changes the archive format to zip on windows.
This is more convenient, since windows doesn't support tar.gz out of the box.

@jon4hz jon4hz force-pushed the completion branch 2 times, most recently from 927b0b3 to e95dbed Compare December 27, 2022 00:33
@maidul98
Copy link
Collaborator

I'm wondering if a man page is necessary? I feel like the current overview of commands and flag is sufficient. Is there something that man will be more helpful for than the current overview when you only type in infisical in the terminal?

Screen Shot 2022-12-26 at 8 44 35 PM

@jon4hz
Copy link
Contributor Author

jon4hz commented Dec 27, 2022

I always like manpages because it gives you an overview of all available commands including all flags.
If you need to search for something specific, you can simply /search for it.

image

infisical help just shows you the available subcommands and current command flags but not all flags from subcommands, too.

@maidul98
Copy link
Collaborator

Is there a reason why I was not able to load the man page like you show in the screenshot when i did infisical man?

@jon4hz
Copy link
Contributor Author

jon4hz commented Dec 27, 2022

infisical man will generate the manpage in it's raw roff format (which the man command will display in a readable way).
If you want it in a readable format ad hoc, you can use infisical man | roff2text | less

@maidul98
Copy link
Collaborator

If we can make the man page self sufficient meaning, it requires no other dependency such as roff2text or other tools to conevert it into a readable format, let's add the man page. I think having it more like man ls where you just type in the command and it shows you the full text without having to pipe to a converter is more convenient.

We can also leave the man page for the future if you would like and only add your other changes in this PR. Let me know what you think

@jon4hz
Copy link
Contributor Author

jon4hz commented Dec 28, 2022

That's exactly how it will work :)

This deploys he manpage accordingly when the user installs infisical through an nfpm build. Same for an AUR installation here. The manpage will be directly accessible using man infisical using these installation methods.

The infisical man command is more like a build hook to generate the page and shouldn't be used by the users in the first place. The command is hidden and wont appear when you type infisical help

@maidul98
Copy link
Collaborator

Ah i see, i misunderstood! Okay, sounds good. I'll review full PR in a bit

Copy link
Collaborator

@maidul98 maidul98 left a 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! 🚀 Will be releasing new CLI update soon

@maidul98 maidul98 merged commit 9ea12b9 into Infisical:main Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants