powerline-go icon indicating copy to clipboard operation
powerline-go copied to clipboard

Newline flag removes right modules

Open polothy opened this issue 4 years ago • 7 comments

Using v1.13.0 with this config:

function powerline_precmd() {
    eval "$($GOPATH/bin/powerline-go -error $? -shell zsh -eval -newline -modules 'venv,cwd,perms,git,jobs,exit,root,vgo' -modules-right 'aws')"
}

function install_powerline_precmd() {
    for s in "${precmd_functions[@]}"; do
        if [ "$s" = "powerline_precmd" ]; then
            return
        fi
    done
    precmd_functions+=(powerline_precmd)
}

if [ "$TERM" != "linux" ]; then
    install_powerline_precmd
fi

With the -newline flag, right modules no longer displays. Without -newline, then right modules do display.

polothy avatar Aug 05 '19 21:08 polothy

Same for me, -newline flag removes right modules at all

artsilenkov avatar Aug 24 '19 17:08 artsilenkov

Newline on its own line is not really possible with the current implementation of right modules, sadly. This would require a major rework

justjanne avatar Apr 24 '20 08:04 justjanne

Note that the workaround for this is to use the newline and root modules like: powerline-go -colorize-hostname -eval -modules 'user,host,cwd,newline,root' -modules-right 'time' -shell zsh

wjam avatar Nov 28 '20 17:11 wjam

Note that the workaround for this is to use the newline and root modules like: powerline-go -colorize-hostname -eval -modules 'user,host,cwd,newline,root' -modules-right 'time' -shell zsh

does this work with bash?

zoj613 avatar Nov 28 '20 17:11 zoj613

@wjam Does that actually work for you? Your exact command for me does not actually include a newline - there's a visual space between the CWD segment and the root segment, but they're on the same line. I'm using ZSH as well.

duckpuppy avatar Mar 03 '21 21:03 duckpuppy

Yes, mine works. My dotfiles repo contains my current configuration which has a ZSH theme that makes use of JSON config file for powerline-go.

wjam avatar Mar 06 '21 12:03 wjam

For me, if I use the --eval option, newline doesn't work at all... it just inserts a space where the newline should be.

duckpuppy avatar Mar 10 '21 16:03 duckpuppy