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

Use ellipsis for continuation prompt (PS2) #493

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

bricewge
Copy link
Contributor

@bricewge bricewge commented Aug 23, 2019

I had a go at tweaking the PS2 prompt that have found unbalanced. Putting the ellipsis just before the prompt symbol looks more boring and replacing the 3 dots with an UTF-8 character reduce the line width. Related with the discussion at #323.
2019-08-23T17:25:25+02:00
On the left you can see the current style and on the right the style in this PR.

I have no strong opinion on this PR, fell free to ditch it's not to your liking.
WDYT?


IssueHunt Summary

IssueHunt has been backed by the following sponsors. Become a sponsor

@mafredri
Copy link
Collaborator

mafredri commented Sep 8, 2019

I kinda like this change but it's not clear to me why the order of ... and cmdand was changed.

  • Before: ... cmdand ❯
  • Now: cmdand… ❯
  • Why not? … cmdand ❯ or …cmdand ❯

The idea of the dots was to signify that the previous prompt continues on this line, especially when cmdand et co. is missing. When it appears after cmdand I don't really understand what it's purpose is.

@mafredri
Copy link
Collaborator

mafredri commented Sep 8, 2019

Hmm, I did give all three variants a try (now/why not), and I do see that "now" kind of looks the best visually, not sure if it conveys the same message but I guess it could work 😄.

Any thoughts on this @sindresorhus?

@mafredri
Copy link
Collaborator

mafredri commented Sep 8, 2019

For reference:
Screen Shot 2019-09-08 at 20 03 42
Screen Shot 2019-09-08 at 20 03 55
Screen Shot 2019-09-08 at 20 04 13

@bricewge
Copy link
Contributor Author

bricewge commented Sep 8, 2019

[...] I do see that "now" kind of looks the best visually

That was my reasoning behind changing the ellipsis position, but it's highly subjective.

When it appears after cmdand I don't really understand what it's purpose is.

Here it's meaning is to it indicate that the "cmdand" continue on that line and that the user is expected to enter something. I see the ellipsis like the underline dots used on some forms to indicate where to write the content.

Copy link
Owner

@sindresorhus sindresorhus left a comment

Choose a reason for hiding this comment

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

I'm fine with this change.

@mafredri mafredri merged commit 8c0ba7d into sindresorhus:master Sep 12, 2019
@mafredri
Copy link
Collaborator

Thanks for this @bricewge!

kgrz added a commit to kgrz/pure that referenced this pull request Dec 11, 2019
* upstream/master:
  Renice the async worker (sindresorhus#505)
  Add zstyle color support to PS2 (sindresorhus#481)
  Improve issue template and system reporting (sindresorhus#517)
  Guard against (ana)conda changing PS1 (sindresorhus#516)
  1.11.0
  Add coloring for git dirty-asterisk (sindresorhus#491)
  Support changing color of the Git action part of the prompt (sindresorhus#486)
  Use ellipsis for continuation prompt (PS2) (sindresorhus#493)
  Fix missing ─ in readme color diagram
  Fix extra space in color diagram of readme
  Simplify the setup phase in the readme (sindresorhus#494)
  Use box characters for prompt diagram in the readme (sindresorhus#495)
kutsan pushed a commit to kutsan/pure that referenced this pull request Jun 19, 2023
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

3 participants