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

Add back the prompt_sp option for zsh >= 5.4.1 #338

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@belak
Copy link
Contributor

belak commented Aug 10, 2017

In 5.4.1, this option was reset between prompts, so to retain the
previous default behavior, this should be added back.

This was the change which caused it to be reset: zsh-users/zsh@43e55a9#diff-bb10d67e7a8561b66a53a805f3c77a40R233

This is the documentation on the option itself: http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting

Add back the prompt_sp option for zsh >= 5.4.1
In 5.4.1, this option was reset between prompts, so to retain the
previous default behavior, this should be added back.
@mafredri

This comment has been minimized.

Copy link
Collaborator

mafredri commented Aug 10, 2017

Thanks @belak, I see no problem with merging this PR, since sp has no effect as long as cr is not enabled. However, if a user has manually enabled cr (via setopt), then this change would suddenly start including whitespace at the end of lines that do not terminate with a newline, but this is minor.

Just wondering what the benefit of merging this is, sticking closer to zsh defaults?

@mafredri

This comment has been minimized.

Copy link
Collaborator

mafredri commented Aug 10, 2017

Just wondering what the benefit of merging this is, sticking closer to zsh defaults?

Or more importantly, any downsides on versions of zsh <5.4.1?

@belak

This comment has been minimized.

Copy link
Contributor

belak commented Aug 10, 2017

Maybe I've made a mistake... we were seeing issues in prezto prompts where things like echo -n hello world wouldn't display anything at all... and it doesn't look like this fixes the underlying problem in pure... since I don't see anything even with the "fix".

@belak

This comment has been minimized.

Copy link
Contributor

belak commented Aug 10, 2017

Ok, it looks like all the prompts I tested had prompt_cr on as well... which pure doesn't... I'm still not sure why the line is getting swallowed, but it doesn't appear to be because of this issue.

@mafredri

This comment has been minimized.

Copy link
Collaborator

mafredri commented Aug 10, 2017

Hmm, I see value in this PR in following queue with zsh changes, but it will have no practical effect. But then again, I just updated to 5.4.1 (actually HEAD-0f8cf76) and Pure is behaving as expected, with or without the change.

screenshot 2017-08-10 23 52 09

Is this what you're seeing as well?

Even with default zsh options, no issues:

~
❯ zsh -f
Franky% fpath+=(~/.zsh/functions)
Franky% autoload -Uz promptinit; promptinit
Franky% prompt pure

~
❯ echo -n hello world
hello world
~
@belak

This comment has been minimized.

Copy link
Contributor

belak commented Aug 10, 2017

Hm, that's fun... I guess it means there's something in prezto triggering that. :/ I tried the same thing as you and also didn't run into that issue.

@belak

This comment has been minimized.

Copy link
Contributor

belak commented Aug 10, 2017

I've narrowed it down to what line is causing the problems, so I'll close this. Sorry for the confusion!

sorin-ionescu/prezto#1426

@belak belak closed this Aug 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment