mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-31 14:43:40 -05:00
(py|rb)env version in modeline + define-builder macro
This commit is contained in:
13
core/lib/defuns-spaceline.el
Normal file
13
core/lib/defuns-spaceline.el
Normal file
@@ -0,0 +1,13 @@
|
||||
;;; defuns-spaceline.el
|
||||
|
||||
;;;###autoload
|
||||
(defun narf|spaceline-env-update ()
|
||||
(when narf--env-command
|
||||
(let* ((command (format "cd '%s' && %s" (narf/project-root) narf--env-command))
|
||||
(s (shell-command-to-string command)))
|
||||
(setq narf--env-version (if (string-match "[ \t\n\r]+\\'" s)
|
||||
(replace-match "" t t s)
|
||||
s)))))
|
||||
|
||||
(provide 'defuns-spaceline)
|
||||
;;; defuns-spaceline.el ends here
|
Reference in New Issue
Block a user