Merge pull request #1213 from gsmadi/fix/python3.7-version-prompt

Display only first line of Python 3.7 version
pull/1217/head
Nils Winkler 2018-07-18 09:07:01 +02:00 committed by GitHub
commit b5e5a70424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ function condaenv_prompt {
}
function py_interp_prompt {
py_version=$(python --version 2>&1 | awk '{print "py-"$2;}') || return
py_version=$(python --version 2>&1 | awk 'NR==1{print "py-"$2;}') || return
echo -e "${PYTHON_THEME_PROMPT_PREFIX}${py_version}${PYTHON_THEME_PROMPT_SUFFIX}"
}