From b5f7b1eaee610123a8e87a18fcabed22d7763fbf Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Tue, 17 Jan 2017 19:30:41 +0100 Subject: [PATCH] Make python --version a single line Pypy outputs two lines and causes an error this way. --- fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 36cc2f7..6d3f7dc 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -566,7 +566,7 @@ function __bobthefish_prompt_vi -S -d 'Display vi mode' end function __bobthefish_virtualenv_python_version -S -d 'Get current python version' - switch (python --version ^&1) + switch (python --version ^| tr '\n' ' ') case 'Python 2*PyPy*' echo $__bobthefish_pypy_glyph case 'Python 3*PyPy*'