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

Changed alignment of options in descriptions. #21

Closed
wants to merge 1 commit into from

Conversation

cage2
Copy link

@cage2 cage2 commented Apr 19, 2020

Hi!

I found the alignment of option's description a bit messed up honestly.

I tried to fix that, i tested with long meta argument or with descriptions that included newlines and seems OK to me.

The only thing i can not understand is why i had to change the directive "&" to "%" to make things works.

I am open to critics and review for this patch (i mean, more than usual!).

Bye!
C.

@libre-man
Copy link
Owner

Hi @cage2,

Thanks for the pull request! I'll look at it in the next few days!

@cage2
Copy link
Author

cage2 commented Apr 19, 2020 via email

digikar99 added a commit to digikar99/unix-opts that referenced this pull request May 22, 2020
opts::print-opts can definitely still improve

libre-man#21
libre-man added a commit that referenced this pull request May 23, 2020
Thanks to @cage2 for this change, this improves the way the options are aligned
when displayed using `DESCRIBE`.
Copy link
Owner

@libre-man libre-man left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, I've merged it in e14c9b5 after doing some minor changes and adding some tests!

(with-output-to-string (s)
(when newline
(format s "~&~a" pad))
(format s "~%~a" pad))
Copy link
Owner

Choose a reason for hiding this comment

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

This used to only output a newline when the output wasn't already at a newline, however as this is an empyt stream (we just created it on line 399) this would never output a newline.

@libre-man libre-man closed this May 23, 2020
libre-man added a commit that referenced this pull request May 23, 2020
Thanks to @cage2 for this change, this improves the way the options are aligned
when displayed using `DESCRIBE`.
libre-man added a commit that referenced this pull request May 23, 2020
Thanks to @cage2 for this change, this improves the way the options are aligned
when displayed using `DESCRIBE`.
@cage2
Copy link
Author

cage2 commented May 23, 2020 via email

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