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

When powerline exceeds terminal's width it will disappear #7

Closed
muttleyxd opened this issue Aug 24, 2017 · 8 comments
Closed

When powerline exceeds terminal's width it will disappear #7

muttleyxd opened this issue Aug 24, 2017 · 8 comments

Comments

@muttleyxd
Copy link

muttleyxd commented Aug 24, 2017

mkdir -p dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10
cd -p dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dir10
git init
git checkout -b very-long-branch-name-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

After executing these powerline disappears for me, I'm not sure if that's the case in original.

While this example is a little overkill, this also can happen in real use - when using terminator and splitting terminals into half.

I use Fish Shell 2.6.0 on Manjaro Linux

@justjanne
Copy link
Owner

Which terminal emulator are you using? I can’t replicate this

Screenshot showing powerline-go in zsh in Konsole breaking into multiple lines

@muttleyxd
Copy link
Author

It's called "terminator"

What I do is just split terminal window in half (split vertical hotkey) and then I go to the repository and it happens

@justjanne
Copy link
Owner

justjanne commented Aug 24, 2017

I tried in terminator, and it’s not an issue there either:

Screenshot from terminator

It seems to be an issue of Fish Shell: Prompt changes to ">" when fish thinks it's too long #904

But it seems like we should introduce a solution where we automatically truncate segments when the prompt becomes too long. I’m thinking of adding a switch to define the priority of segments in order, so that it removes segments by priority if it becomes too long.

@muttleyxd
Copy link
Author

Okay, thanks for your investigation - that's quite weird behavior of Fish, but I guess it probably will not be fixed considering how old the bug report is (2013).

@justjanne
Copy link
Owner

Would the suggested option above (removing segments by priority if the result would end up too long) work for you? If yes, I’d implement that.

@justjanne
Copy link
Owner

justjanne commented Aug 24, 2017

@muttleyxd I introduced now the priority system, which should automatically cut down the length of the shell, please try if this works for you.

Screenshot showing terminals with different width, and the prompt automatically downsizing

@muttleyxd
Copy link
Author

muttleyxd commented Aug 25, 2017

It seems like Fish overrides this behavior and does not call fish_prompt when terminal is too small. However after splitting few times in terminator Fish complains about terminal not being large enough and it starts working properly (until resize).

Welcome to fish, the friendly interactive shell
<W> fish: Current terminal parameters set terminal size to unreasonable value.
<W> fish: Defaulting terminal size to 80x24.

fishy

@justjanne
Copy link
Owner

I’m not sure if there’s anything else I can do here, but I’m gonna close this issue, and you’ll have to file one with the fish project.

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