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

Find -z conditional expression in bash manpage #6

Open
pylipp opened this issue Apr 24, 2020 · 10 comments
Open

Find -z conditional expression in bash manpage #6

pylipp opened this issue Apr 24, 2020 · 10 comments

Comments

@pylipp
Copy link

pylipp commented Apr 24, 2020

Thanks for the great tool, just started experimenting a little bit :)
How come mansnip does not find the part about -z string in the CONDITIONAL EXPRESSIONS section?
I tried mansnip bash '-z string'.

@kristopolous
Copy link
Owner

hrmm ... this is why I need some regression testing. I can fix it but I can't see what it may break. Let me do that.

kristopolous added a commit that referenced this issue Apr 26, 2020
@kristopolous
Copy link
Owner

alright I added a testing system and hopefully addressed this issue

@pylipp
Copy link
Author

pylipp commented Apr 26, 2020

Thanks, that fixes the issue for me :)
I also wondered why mansnip bash CONDITIONAL does not return anything...

@kristopolous
Copy link
Owner

lol ok let me look into that. This is why this hasn't been done before. It's actually not easy.

@kristopolous
Copy link
Owner

kristopolous commented Apr 27, 2020

so you're looking for a subheading jump? I never really planned for those but it's probably possible.

@kristopolous
Copy link
Owner

Alright, this now works with the caveat of sometimes showing a line or two of extra information ... that can also be avoided but the only solution I can currently think of is rather sophisticated.

@kristopolous
Copy link
Owner

ug, not even my hypothesized sophisticated method would work ... I'd have to parse the source man file

@kristopolous
Copy link
Owner

alright, I'll bump the pypi version with this fix and then contemplate my destiny.

@kristopolous
Copy link
Owner

I'm definitely in an avoidance/procrastination pattern now. What a toxic mess those are ... let me do something

@kristopolous
Copy link
Owner

So I could re-interpret the groff man files and then basically create my own post-processor to format it. I forget language theory from university but this is essentially a regular grammar with a simple stack machine. what a shitton of work though.

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

2 participants