powerline
powerline copied to clipboard
Multiline prompt, no newline at end of "above" line.
Hey all. I'm new here, so forgive me if this isn't an issue. I'm trying to set up a multiline prompt and I'm running into a few problems. FYI, I'm using zsh.
- I have an "above" list in my segments list, but the cursor starts at the end of the right segments (the last character on the row). After one character, the rest of the characters follow on the next line. For example:
This happens no matter what width the terminal is.
- If you compare the screenshot with my config below, I'm supposed to have a
hostname
segment in the above left. It is not showing up. - You can also see that the
mode
andlast_pipe_status
segments (which are supposed to be in left and right, respectively) aren't showing up either.
Here is my .config/powerline/mine.json:
{
"segments": {
"above": [
{
"left": [
{
"function": "powerline.segments.common.net.hostname",
"priority": 10,
},
{
"function": "powerline.segments.common.env.user",
"priority": 30,
},
{
"function": "powerline.segments.common.env.virtualenv",
"priority": 50
},
{
"function": "powerline.segments.shell.cwd",
"priority": 10,
"args": {
"use_path_separator": true,
"dir_shorten_len": 1,
"dir_limit_depth": 10,
"shorten_home": true
}
},
{
"function": "powerline.segments.shell.jobnum",
"priority": 20
},
{
"function": "powerline.segments.shell.continuation"
}
],
"right": [
{
"function": "powerline.segments.common.vcs.branch",
"priority": 40,
"args": {
"status_colors": true
}
},
{
"function": "powerline.segments.common.time.date",
"name": "time",
"args": {
"format": "%H:%M:%S",
"istime": true
}
},
{
"function": "powerline.segments.common.time.date",
"args": {
"format": "%A, %d %B %Y"
}
}
]
}
],
"left": [
{
"function": "powerline.segments.shell.mode"
}
],
"right": [
{
"function": "powerline.segments.shell.last_pipe_status",
"priority": 10
}
]
}
}
hostname is not supposed to show up with this configuration, by default it is automatically disabled unless ssh is detected. above
part is missing a filler segment (e.g. see vim statusline configuration). Also mode
is not supposed to show up unless you are either using one of vi*
keymaps or set default
argument to something that is different from your current keymap (e.g. "args": {"default": "xxx_nonexistent_keymap_xxx"}
.
Basically you do not have a multiline prompt, you have a single above
line. Though there still is a bug: a single above line should result in an empty prompt below, not above line used as a below line.
A single above line works fine when zpython is used. But when it is not used PS1 looks like PS1='$(…)'
and expansion of $()
eats all trailing newlines.
I'm having a similar problem
Is it related to the same bug or should I open a new ticket?
@Croxarens Your problem has absolutely nothing to do with this issue. Also it is already known: #1652.
@ZyX-I thanks the answer ;)
hostname is not supposed to show up with this configuration, by default it is automatically disabled unless ssh is detected.
above
part is missing a filler segment (e.g. see vim statusline configuration). Alsomode
is not supposed to show up unless you are either using one ofvi*
keymaps or setdefault
argument to something that is different from your current keymap (e.g."args": {"default": "xxx_nonexistent_keymap_xxx"}
.Basically you do not have a multiline prompt, you have a single
above
line. Though there still is a bug: a single above line should result in an empty prompt below, not above line used as a below line.
I'm facing the same issue, and I cannot find anything about filler
in the whole repo. could anyone provide an example here?