Add pyenv version-name (#391)

see: #109
This commit is contained in:
Wang Kai 2020-12-13 02:21:06 +08:00 committed by GitHub
parent fb34eb5eb6
commit c1475ba6ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,17 +196,17 @@ PARSER should be a function for parsing COMMAND's output line-by-line, to
(doom-modeline-def-env python
:hooks 'python-mode-hook
:command (lambda () (cond ((and (fboundp 'pipenv-project-p)
(pipenv-project-p))
(list "pipenv" "run"
(or doom-modeline-env-python-executable
python-shell-interpreter
"python")
"--version"))
((list (or doom-modeline-env-python-executable
python-shell-interpreter
"python")
"--version"))))
:parser (lambda (line) (cadr (split-string line))))
(pipenv-project-p))
(list "pipenv" "run"))
((executable-find "pyenv") (list "pyenv" "version-name"))
((list (or doom-modeline-env-python-executable
python-shell-interpreter
"python")
"--version"))))
:parser (lambda (line) (let ((version (split-string line)))
(if (>= (length version) 2)
(cadr version)
(car version)))))
;;;###autoload (autoload 'doom-modeline-env-setup-ruby "doom-modeline-env")
(doom-modeline-def-env ruby