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

Man page fixes #1364

Merged
merged 1 commit into from
May 5, 2022
Merged

Man page fixes #1364

merged 1 commit into from
May 5, 2022

Conversation

isidentical
Copy link
Contributor

@isidentical isidentical commented Apr 18, 2022

  • Highlighting for options (-x, --x) now doesn't strip the prefix (may be whitespace).
  • Escape sequences are now cross-platform compatible (directly taken by groff/troff [man's renderer])
  • Now we check for the section before displaying the man pages. On MacOS, there is HTTP(n) which is different from our HTTP(1). This used to conflict with it, and we showed the wrong page. Now we specifically ask foir HTTP(1).
  • Errors that might happen (e.g non executable man command) is now suppressed. So in the worst case (if anything regarding man execution goes wrong), we'll always display the manual.
  • Docs for man pages.
  • Man page for httpie (and it's own custom part telling people to use man http)
  • Epilog for the man pages (see also part)
  • Comments warning you should not edit the file, and pointing to the right source.

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2022

Codecov Report

Merging #1364 (e30ae3b) into master (4d7d6b6) will decrease coverage by 1.79%.
The diff coverage is 93.30%.

❗ Current head e30ae3b differs from pull request most recent head 53ba11e. Consider uploading reports for the commit 53ba11e to get more accurate results

@@            Coverage Diff             @@
##           master    #1364      +/-   ##
==========================================
- Coverage   97.28%   95.49%   -1.80%     
==========================================
  Files          67      103      +36     
  Lines        4235     7232    +2997     
==========================================
+ Hits         4120     6906    +2786     
- Misses        115      326     +211     
Impacted Files Coverage Δ
httpie/output/ui/man_pages.py 0.00% <0.00%> (ø)
httpie/output/ui/rich_utils.py 0.00% <0.00%> (ø)
tests/test_binary.py 100.00% <ø> (ø)
tests/utils/__init__.py 92.30% <ø> (+3.62%) ⬆️
tests/utils/http_server.py 99.00% <ø> (ø)
tests/utils/matching/parsing.py 97.95% <ø> (-2.05%) ⬇️
tests/utils/matching/test_matching.py 100.00% <ø> (ø)
tests/utils/matching/tokens.py 100.00% <ø> (ø)
tests/utils/plugins_cli.py 99.20% <ø> (ø)
httpie/compat.py 39.21% <36.73%> (-60.79%) ⬇️
... and 91 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 419cc2c...53ba11e. Read the comment docs.

@isidentical isidentical requested a review from jkbrzt April 19, 2022 10:30
@isidentical isidentical marked this pull request as ready for review April 19, 2022 10:30
@httpie httpie deleted a comment from repdox-cyfso6-wonzAb Apr 19, 2022
@httpie httpie deleted a comment from repdox-cyfso6-wonzAb Apr 19, 2022
Copy link
Member

@jkbrzt jkbrzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked also about man httpie.

@isidentical
Copy link
Contributor Author

We should have that, no?

@jkbrzt
Copy link
Member

jkbrzt commented Apr 23, 2022

Yes, even if just something super simple. E.g., a list of the management commands and a clear mention of man http / man https. It’s important to have it because people will tend to run man httpie. (Sorry if it’s already there, I’m yet to carefuly review this.)

@isidentical
Copy link
Contributor Author

Ah, ok. That is what I meant, it is already here.

@isidentical
Copy link
Contributor Author

isidentical commented Apr 23, 2022

We were directly using the description which mentioned http and https commands, but not man http explicitly. I've also added it now.
image

@jkbrzt
Copy link
Member

jkbrzt commented Apr 23, 2022

@isidentical that’s perfect 🤩

@isidentical isidentical force-pushed the man-page-fixes branch 6 times, most recently from 53ba11e to 712d9c2 Compare April 29, 2022 10:52
- Highlighting for options (-x, --x) now doesn't strip the prefix (may be whitespace).
- Escape sequences are now cross-platform compatible (directly taken by groff/troff [man's renderer])
- Now we check for the section before displaying the man pages.
- On MacOS, there is HTTP(n) which is different from our HTTP(1). This used to conflict with it, and we showed the wrong page. Now we specifically ask foir HTTP(1).
- Errors that might happen (e.g non executable man command) is now suppressed. So in the worst case (if anything regarding man execution goes wrong), we'll always display the manual.
- Docs for man pages.
- HTTPie man pages.
- Epilog for the man pages (see also)
- Auto-generated comments.
@jkbrzt jkbrzt merged commit f9b5c2f into httpie:master May 5, 2022
egleston pushed a commit to egleston/httpie that referenced this pull request May 5, 2022
- Highlighting for options (-x, --x) now doesn't strip the prefix (may be whitespace).
- Escape sequences are now cross-platform compatible (directly taken by groff/troff [man's renderer])
- Now we check for the section before displaying the man pages.
- On MacOS, there is HTTP(n) which is different from our HTTP(1). This used to conflict with it, and we showed the wrong page. Now we specifically ask foir HTTP(1).
- Errors that might happen (e.g non executable man command) is now suppressed. So in the worst case (if anything regarding man execution goes wrong), we'll always display the manual.
- Docs for man pages.
- HTTPie man pages.
- Epilog for the man pages (see also)
- Auto-generated comments.
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.

None yet

4 participants