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

Generate completions using man page #17

Open
scrouthtv opened this issue Oct 14, 2019 · 4 comments
Open

Generate completions using man page #17

scrouthtv opened this issue Oct 14, 2019 · 4 comments

Comments

@scrouthtv
Copy link

Some programs, like unrtf have all the options documented on their man page, but the --help command is not that helpful. Is it possible to extend the functionality to cover completion generation by man pages as well?

@zfogg
Copy link

zfogg commented Aug 17, 2020

+t this would be amazing.

@roblav96
Copy link

roblav96 commented Nov 2, 2020

@scrouthtv @zfogg

function man2comp() {
	man "$1" | cat | python "$ZSH_COMPLETION_GENERATOR_SRCDIR/help2comp.py" "$1" >|"$GENCOMPL_FPATH/_$1"
} && compdef man2comp=man

@zfogg
Copy link

zfogg commented Nov 10, 2020

@scrouthtv @zfogg

function man2comp() {
	man "$1" | cat | python "$ZSH_COMPLETION_GENERATOR_SRCDIR/help2comp.py" "$1" >|"$GENCOMPL_FPATH/_$1"
} && compdef man2comp=man

dude make a PR for this puppy

@scrouthtv
Copy link
Author

I think you also don't need quotes around the $1

man takes single word arguments

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

No branches or pull requests

3 participants