Meaning of red number 1.

42 views
Skip to first unread message

Yuan Gao

unread,
Aug 21, 2017, 6:42:33 PM8/21/17
to powerline

Hi guys,


This might be a dumb question, but does anyone know the meaning of this red 1? And how do I remove it?


Thanks!


Nikolay Aleksandrovich Pavlov

unread,
Aug 21, 2017, 6:48:12 PM8/21/17
to Yuan Gao, powerline
Try running `(return 42)`, number should change to 42: unless you altered the colorscheme segment with such coloring indicates last command exit code. So you don’t need to remove it, but it should go away if you run a command which exits without errors (e.g. `true`).

--
You received this message because you are subscribed to the Google Groups "powerline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powerline-support+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nikolay Aleksandrovich Pavlov

unread,
Aug 21, 2017, 6:49:36 PM8/21/17
to Yuan Gao, powerline
2017-08-22 1:48 GMT+03:00 Nikolay Aleksandrovich Pavlov <zyx...@gmail.com>:
Try running `(return 42)`, number should change to

​* `(exit 42)`, `return` from a subshell works in zsh, but not bash.​

Message has been deleted

Yuan Gao

unread,
Aug 21, 2017, 7:04:27 PM8/21/17
to powerline, yuang...@gmail.com
Hi Nikolay,

Thank you so much for your help!

I tried running `(exit 42)` and end up still having the red 1.

To give you more information, I tried restarting my pc and reopening a bash shell, the the red 1 still stays.

If I have vim running in the background I get a yellow 1 next to it.

Any idea what else it might be?

Thank you!



On Monday, August 21, 2017 at 6:49:36 PM UTC-4, Nikolay Aleksandrovich Pavlov wrote:
2017-08-22 1:48 GMT+03:00 Nikolay Aleksandrovich Pavlov <zyx...@gmail.com>:
Try running `(return 42)`, number should change to

​* `(exit 42)`, `return` from a subshell works in zsh, but not bash.​

 
42: unless you altered the colorscheme segment with such coloring indicates last command exit code. So you don’t need to remove it, but it should go away if you run a command which exits without errors (e.g. `true`).
2017-08-22 1:42 GMT+03:00 Yuan Gao <yuang...@gmail.com>:

Hi guys,


This might be a dumb question, but does anyone know the meaning of this red 1? And how do I remove it?


Thanks!


--
You received this message because you are subscribed to the Google Groups "powerline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powerline-supp...@googlegroups.com.

Yuan Gao

unread,
Aug 21, 2017, 7:39:18 PM8/21/17
to powerline, yuang...@gmail.com
I'm not sure but I think running "fc-cache -vf /usr/share/fonts/" fixed my issue.

Thank you very much for your help.



On Monday, August 21, 2017 at 6:48:12 PM UTC-4, Nikolay Aleksandrovich Pavlov wrote:
Try running `(return 42)`, number should change to 42: unless you altered the colorscheme segment with such coloring indicates last command exit code. So you don’t need to remove it, but it should go away if you run a command which exits without errors (e.g. `true`).
2017-08-22 1:42 GMT+03:00 Yuan Gao <yuang...@gmail.com>:

Hi guys,


This might be a dumb question, but does anyone know the meaning of this red 1? And how do I remove it?


Thanks!


--
You received this message because you are subscribed to the Google Groups "powerline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powerline-supp...@googlegroups.com.

Nikolay Aleksandrovich Pavlov

unread,
Aug 22, 2017, 2:17:40 AM8/22/17
to Yuan Gao, powerline
I have no idea how that could fix things. But given that `(exit 42)` (**without backticks**, I am just using markdown in messages also when only plain text is supported) does not work there is another variant: you have a bash plugin which uses PROMPT_COMMAND and adds some value before powerline: `echo "$PROMPT_COMMAND"` needs to start with `_powerline_status_wrapper _powerline_set_prompt`, if it does not may never get correct values in pipestatus segment.

So if you have any plugins modifying `$PROMPT_COMMAND`, or modify it in your bashrc yourself then you should make sure that you *first* modify `$PROMPT_COMMAND` and *then* source powerline and not the opposite.

To unsubscribe from this group and stop receiving emails from it, send an email to powerline-support+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages