Pure: New line before prompt

Created on 26 Jul 2018  ·  13Comments  ·  Source: sindresorhus/pure

General information

  • Pure version: 1.7.0
  • ZSH version: zsh 5.3 (x86_64-apple-darwin17.0)
  • Terminal program & version: iTerm 3.1.7 and Terminal 2.8.2
  • Operating system: macOS High Sierra 10.13.6
  • ZSH framework: oh-my-zsh

I have:

  • [x] Tested with another terminal program and can reproduce the issue:
  • [x] Followed the Integration instructions for my framework

Problem description

There is a new line before my prompt in both iTerm and the native mac terminal.

iTerm:
screen shot 2018-07-26 at 12 16 32 am

Terminal (the tilda is there, just bad color, don’t use the app anymore):
screen shot 2018-07-26 at 12 16 24 am

Reproduction steps

  1. Open a new terminal window

My .zshrc:

autoload -U promptinit; promptinit
prompt pure

Most helpful comment

Isn't that a bit misleading?

All 13 comments

This may be related:
screen shot 2018-07-26 at 12 18 06 am

It seems that my $PS1 has a newline before the prompt (never changed it though)

Sorry, this is as intended, or rather, see https://github.com/sindresorhus/pure/issues/233#issuecomment-248549416 as to why we can't do anything about it.

@mafredri Why does the screenshot in the readme not have a newline? I reproduced the same scenario with pure prompt, hyper, and hyper-snazzy and it looks like this:

screen shot 2018-08-12 at 6 55 38 pm

compared to in the readme

screen shot 2018-08-12 at 6 54 42 pm

There is a lot more space between the traffic lights and the prompt

@Hum4n01d the newline has scrolled out of view.

Isn't that a bit misleading?

@Hum4n01d I’m afraid I don’t see the issue, I doubt there was any intent to mislead or misrepresent the fact in that screenshot.

I’ve already explained why we can’t do anything about it. Why do you still see this as such an issue?

I understand the problem, I am simply pointing out that it is misleading to hide a problem with the project, I likely wouldn't have installed pure if I'd known about this

At the same time, I've gotten used to it and I like the prompt personally 🤷‍♂️

I think I understand where you’re coming from now. You see this as a problem whereas I would not classify it as one. In my view it’s a small improvement that we, unfortunately, can’t make. As such I did not think the screenshot hid anything.

I’m glad you still gave it a chance and didn’t let it turn you away from Pure though. 😊

At least it would be cool if could add a margin to the left of the prompt so it wouldn't look so bad. :P

@Pablo1107 you mean like this?

PROMPT="  $PROMPT"
eval "$(echo "${$(whence -f prompt_pure_preprompt_render)/\%~/  %~}")"

😝

@mafredri Almost. haha
imagen

On a sidenote. I test this on termite and xterm, but if you do Ctrl+L (as opposed to 'clear' command which dosn't) it clears the terminal and dosn't add the new line on top, so I did this in .zshrc:

prompt pure
xdotool key ctrl+l

Now it looks like this:
imagen

Edit:
@mafredri is there a way to also move the cursor prompt aswell?

Hmm, it was supposed to indent both ¯\_(ツ)_/¯...
image

Glad you found a workaround anyhow :). If you want a margin though, I suggest looking at terminals that support margin / padding.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harukizaemon picture harukizaemon  ·  10Comments

opticalgenesis picture opticalgenesis  ·  9Comments

bigH picture bigH  ·  8Comments

jpresley23 picture jpresley23  ·  8Comments

Rawnly picture Rawnly  ·  9Comments