Skip to content

Commit

Permalink
Recognize pyproject.toml when showing pyenv section (spaceship-prompt…
Browse files Browse the repository at this point in the history
…#550)

pyproject.toml specifies what build dependencies project have in order to
execute their chosen build system. Tools like Poetry[1] use the file to store
the build instructions and requirements. See PEP-518[2] for more

[1]: https://github.com/sdispater/poetry
[2]: https://www.python.org/dev/peps/pep-0518/#file-format
  • Loading branch information
richin13 authored and salmanulfarzy committed Nov 7, 2018
1 parent b03d9f2 commit c372891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sections/pyenv.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spaceship_pyenv() {
[[ $SPACESHIP_PYENV_SHOW == false ]] && return

# Show pyenv python version only for Python-specific folders
[[ -f requirements.txt ]] || [[ -n *.py(#qN^/) ]] || return
[[ -f requirements.txt || -f pyproject.toml || -n *.py(#qN^/) ]] || return

spaceship::exists pyenv || return # Do nothing if pyenv is not installed

Expand Down

0 comments on commit c372891

Please sign in to comment.