prompt change

This commit is contained in:
2020-06-05 23:17:33 +02:00
parent e6d2c6f787
commit a8b491bf14

View File

@ -13,7 +13,8 @@ end
function prompt::pyenv function prompt::pyenv
if test -n "$PYENV_VERSION" if test -n "$PYENV_VERSION"
echo -n -s (yellow)(printf '%s' \U1F40D)"["(cyan)"$PYENV_VERSION"(off)"@"(python -c "import sys;t='{v[0]}.{v[1]}.{v[2]}'.format(v=list(sys.version_info[:3]));sys.stdout.write(t)")(yellow)"]"(off) echo -n -s (yellow)(printf '%s' \U1F40D)"["(cyan)"$PYENV_VERSION"(off)"@"(python -c "import sys;t='{v[0]}.{v[1]}.{v[2]}'.format(v=list(sys.version_info[:3]));sys.stdout.write(t)")(yellow)"]"(off)
else if test (command -v pyenv) # else if test (command -v pyenv)
else if test -n "$VIRTUAL_ENV"
echo -n -s (yellow)(printf '%s' \U1F40D)"["(cyan)(pyenv version-name | sed 's/:.*$//' )(off)"@"(python -c "import sys;t='{v[0]}.{v[1]}.{v[2]}'.format(v=list(sys.version_info[:3]));sys.stdout.write(t)")(yellow)"]"(off) echo -n -s (yellow)(printf '%s' \U1F40D)"["(cyan)(pyenv version-name | sed 's/:.*$//' )(off)"@"(python -c "import sys;t='{v[0]}.{v[1]}.{v[2]}'.format(v=list(sys.version_info[:3]));sys.stdout.write(t)")(yellow)"]"(off)
else if test (command -v python) else if test (command -v python)
echo -n -s (yellow)(printf '%s' \U1F40D)"["(cyan)(python -c "import sys;t='{v[0]}.{v[1]}.{v[2]}'.format(v=list(sys.version_info[:3]));sys.stdout.write(t)")(yellow)"]"(off) echo -n -s (yellow)(printf '%s' \U1F40D)"["(cyan)(python -c "import sys;t='{v[0]}.{v[1]}.{v[2]}'.format(v=list(sys.version_info[:3]));sys.stdout.write(t)")(yellow)"]"(off)