mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix: env cmd errors on Windows.
This commit is contained in:
parent
8af6cb74f6
commit
c159a5cd91
1 changed files with 3 additions and 3 deletions
|
@ -1151,15 +1151,15 @@ See `mode-line-percent-position'.")
|
|||
;; Versions, support Python, Ruby and Golang
|
||||
(add-hook 'python-mode-hook
|
||||
(lambda ()
|
||||
(when (executable-find "python")
|
||||
(when (and (executable-find "python") (executable-find "cut") (executable-find "sed"))
|
||||
(setq doom-modeline-env-command "python --version 2>&1 | cut -d' ' -f2 | sed -n '1p'"))))
|
||||
(add-hook 'ruby-mode-hook
|
||||
(lambda ()
|
||||
(when (executable-find "ruby")
|
||||
(when (and (executable-find "ruby") (executable-find "cut") (executable-find "sed"))
|
||||
(setq doom-modeline-env-command "ruby --version 2>&1 | cut -d' ' -f2 | sed -n '1p'"))))
|
||||
(add-hook 'go-mode-hook
|
||||
(lambda ()
|
||||
(when (executable-find "go")
|
||||
(when (and (executable-find "go") (executable-find "cut") (executable-find "tr") (executable-find "sed"))
|
||||
(setq doom-modeline-env-command "go version 2>&1 | cut -d' ' -f3 | tr -d 'go' | sed -n '1p'"))))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue