Merge pull request #67 from Jimx-/master

Add Pipenv integration
This commit is contained in:
Vincent Zhang 2018-12-14 14:22:26 +08:00 committed by GitHub
commit ee2aa11bbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1639,8 +1639,10 @@ mouse-3: Describe current input method")
;; Versions, support Python, Ruby, Perl and Golang, etc.
(add-hook 'python-mode-hook
(lambda ()
(when (and doom-modeline-python-executable (executable-find doom-modeline-python-executable) (executable-find "cut") (executable-find "sed"))
(setq doom-modeline-env-command (concat doom-modeline-python-executable " --version 2>&1 | cut -d' ' -f2 | sed -n '1p'")))))
(cond ((and (fboundp 'pipenv-project-p) (pipenv-project-p) (executable-find "pipenv") (executable-find "cut") (executable-find "sed") (executable-find "xargs"))
(setq doom-modeline-env-command "pipenv run python --version 2>&1 | cut -d' ' -f2 | sed -n '1p' | xargs echo 'Pipenv'"))
((and doom-modeline-python-executable (executable-find doom-modeline-python-executable) (executable-find "cut") (executable-find "sed"))
(setq doom-modeline-env-command (concat doom-modeline-python-executable " --version 2>&1 | cut -d' ' -f2 | sed -n '1p'"))))))
(add-hook 'ruby-mode-hook
(lambda ()
(when (and (executable-find "ruby") (executable-find "cut") (executable-find "sed"))