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

help command doesn't work in macOS #19

Closed
russelldavis opened this issue Jul 7, 2020 · 5 comments
Closed

help command doesn't work in macOS #19

russelldavis opened this issue Jul 7, 2020 · 5 comments

Comments

@russelldavis
Copy link

The man command in macOS doesn't support the -l option.

$ encpass.sh help
man: invalid option -- l
man, version 1.6g

usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
	[-m system] [-p string] name ...
@ahnick
Copy link
Collaborator

ahnick commented Jul 7, 2020

@russelldavis Thanks for this. I had assumed (incorrectly) this was a standard flag across man implementations. Does macOS use a different flag or is there a typical workaround you are aware of? If not, then I think I can fallback to stripping the man page formatting and outputting to less.

@russelldavis
Copy link
Author

Unfortunately I don't see any equivalent flag. I'm guessing there's probably a workaround, but nothing jumps out at me right away. For reference, the manpage is here: https://www.unix.com/man-page/osx/1/man

ahnick added a commit that referenced this issue Jul 8, 2020
@ahnick
Copy link
Collaborator

ahnick commented Jul 8, 2020

@russelldavis I just pushed a branch called "help" (https://github.com/plyint/encpass.sh/tree/help) to attempt to emulate what man does when the -l option is not available. It should also strip the formatting and directly output to less if man is missing on the system.

If you have a moment and wouldn't mind pulling the branch down and testing on Mac I'd appreciate it. Thanks.

@russelldavis
Copy link
Author

Just tried it, works great! Thanks.

@ahnick
Copy link
Collaborator

ahnick commented Jul 8, 2020

Great, thanks for confirming. I have pushed to master and published a new release. Marking as closed.

@ahnick ahnick closed this as completed Jul 8, 2020
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