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

Multiple ZSH prompts with dotphiles theme #12

Open
nbellowe opened this issue Mar 24, 2015 · 8 comments
Open

Multiple ZSH prompts with dotphiles theme #12

nbellowe opened this issue Mar 24, 2015 · 8 comments

Comments

@nbellowe
Copy link

Sometimes, randomly -- after I've been using dotphiles's theme working properly for a while, this happens.

screen shot 2015-03-23 at 11 24 25 pm

I'm not sure how to debug it. It looks like two prompts are created when I'm in half screen, but when I expand it out, it shows that its actually one prompt

screen shot 2015-03-23 at 11 27 02 pm

Once it happens once, it happens over and over again, and sometimes gets bigger.
screen shot 2015-03-23 at 11 29 19 pm

Again, looks like seperate lines, but isn't, here is the same screen in a wider view.
screen shot 2015-03-23 at 11 32 00 pm

It resets on starting a new terminal, and I can't find a single cause.

Any suggestions of what I can do to figure out why it is happening?

@benohara
Copy link
Member

How strange, dont think I've ever noticed anything like that....

Can you post the following??

echo $PS1
echo $MAINPROMPT
echo $prompt_detail
echo $prompt_seperator
echo $RPROMPT
echo $COLUMNS

Should be able to figure out whats happening then...maybe :)

@nbellowe
Copy link
Author

Here you go:

*❯❯ *echo $PS1

%{$MAINPROMPT%}%{$prompt_detail%}%{$prompt_seperator%}

$SUBPROMPT

  • ❯❯ *echo $MAINPROMPT

%(!.%U%{%}.%{%})%n%u%{%} on %{%}ubuntu%u%{%} in %{*%}%5~ *

  • ❯❯ *echo $prompt_detail

%{%{%}❮%{%}git%{%}:%{%}master%{%}▸%{%}origin/master%{%}%{%}❯ %}

  • ❯❯ *echo $prompt_seperator
  • ❯❯ *echo $RPROMPT

${editor_info[keymap]}${editor_info[overwrite]}${VIM:+"
%B%{$prompt_green%}V%b%{$prompt_reset%}"}

nbellowe* on ubuntu in *_~/sync/cs2400/perf git:_master▸origin/master

  • ❯❯ *echo $COLUMNS

86

@nbellowe
Copy link
Author

I figured something out!

If I enter the command COLUMNS=80 it resets the prompt to normal. If I
enter above 100 (in half screen) then it goes back to the malformed two
line one.

Hence $COLUMNS is triggering something...

On Tue, Mar 24, 2015 at 11:48 PM, Nathan Bellowe nbellowe@gmail.com wrote:

Here you go:

*❯❯ *echo $PS1

%{$MAINPROMPT%}%{$prompt_detail%}%{$prompt_seperator%}

$SUBPROMPT

  • ❯❯ *echo $MAINPROMPT

%(!.%U%{%}.%{%})%n%u%{%} on %{%}ubuntu%u%{%} in %{*%}%5~ *

  • ❯❯ *echo $prompt_detail

%{%{%}❮%{%}git%{%}:%{%}master%{%}▸%{%}origin/master%{%}%{%}❯ %}

  • ❯❯ *echo $prompt_seperator
  • ❯❯ *echo $RPROMPT

${editor_info[keymap]}${editor_info[overwrite]}${VIM:+"
%B%{$prompt_green%}V%b%{$prompt_reset%}"}

nbellowe* on ubuntu in *_~/sync/cs2400/perf git:_master
origin/master❯

  • ❯❯ *echo $COLUMNS

86

@benohara
Copy link
Member

COLUMNS should be set to the width of your terminal....if its over 80, then it includes all the 'extras', otherwise just the basic prompt...what terminal are you using? I cant seem to replicate it under iterm2 or terminal on osx.

@nbellowe
Copy link
Author

I'm just in terminal. Any more ideas on where to check?

@nbellowe
Copy link
Author

Try my fork of all of dotphiles, and lets see if that reproduces it on another computer.

@benohara
Copy link
Member

I'll have a look this evening and clone your repo, also just seen https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97880 which sounds the same...I'm using zsh 5.0.7 from homebrew, what version do you have installed....just been trying it out with a git stash to see if thats related..i very rarely stash anything. Will let you know if I find anything.

@nbellowe
Copy link
Author

Please do, I will let you know if I figure it out.
On Mar 30, 2015 12:23 AM, "benohara" notifications@github.com wrote:

I'll have a look this evening and clone your repo, also just seen
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97880 which sounds the
same...I'm using zsh 5.0.7 from homebrew, what version do you have
installed....just been trying it out with a git stash to see if thats
related..i very rarely stash anything. Will let you know if I find anything.


Reply to this email directly or view it on GitHub
#12 (comment).

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

No branches or pull requests

2 participants