dundalek/closh

[BUG] powerline-shell prompt eats stdout

Opened this issue · 5 comments

As you see, the prompt is eating a line from stdout:
image

upper -u | cat

My .powerline-shell.json:

{
  "segments": [
    "time",
    "username",
    "ssh",
    "cwd",
    "git",
    "hg",
    "jobs",
    "exit_code",
    "read_only",
    "newline",
    "root"
  ],
  "theme": "~/anaconda/lib/python3.6/site-packages/powerline_shell/themes/solarized_light.py"
}

What is this upper command?

@dundalek

(defcmd upper clojure.string/upper-case) 

I see, it is indeed a bug. However, it is not caused by powerline, it is just a bug in the pipeline implementation. I will look into it when I have some more time.

After some digging it really seems to be caused by a combination of readline+powerline. If the last line of the output does not end with newline, the prompt gets placed on the same line, therefore "eating" the line. The simplest case to reproduce is echo -n x. The bug does not happen with the default plain prompt.