tools/direnv: fix async-shell-command
This commit is contained in:
parent
c7a6cf8403
commit
3743bc70ab
1 changed files with 12 additions and 0 deletions
|
@ -54,4 +54,16 @@ flycheck issues with direnv and on nix."
|
||||||
(funcall orig-fn))
|
(funcall orig-fn))
|
||||||
(doom-log "Couldn't find direnv executable")))
|
(doom-log "Couldn't find direnv executable")))
|
||||||
|
|
||||||
|
(defadvice! +direnv-update-async-shell-command-a (command &optional output-buffer _error-buffer)
|
||||||
|
:before #'shell-command
|
||||||
|
(when (string-match "[ \t]*&[ \t]*\\'" command)
|
||||||
|
(let ((environment process-environment)
|
||||||
|
(path exec-path)
|
||||||
|
(shell shell-file-name))
|
||||||
|
(with-current-buffer
|
||||||
|
(get-buffer-create (or output-buffer "*Async Shell Command*"))
|
||||||
|
(setq-local process-environment environment)
|
||||||
|
(setq-local exec-path path)
|
||||||
|
(setq-local shell-file-name shell)))))
|
||||||
|
|
||||||
(direnv-mode +1))
|
(direnv-mode +1))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue