From c800b62a1964836dc09867da5c57fe80b5432810 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 23 Aug 2018 11:05:45 +0800 Subject: [PATCH] Show perl version in the modeline. --- doom-modeline.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doom-modeline.el b/doom-modeline.el index 42e14c3..ab0844e 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -1131,6 +1131,10 @@ See `mode-line-percent-position'.") (lambda () (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 'perl-mode-hook + (lambda () + (when (and (executable-find "perl") (executable-find "cut") (executable-find "tr") (executable-find "sed")) + (setq doom-modeline-env-command "perl --version 2>&1 | cut -d'(' -f2 | cut -d')' -f1 | tr -d 'v' | sed -n '2p'")))) (add-hook 'go-mode-hook (lambda () (when (and (executable-find "go") (executable-find "cut") (executable-find "tr") (executable-find "sed"))