diff --git a/direnv.el b/direnv.el index 87f8d2b..3ed8913 100644 --- a/direnv.el +++ b/direnv.el @@ -235,6 +235,13 @@ When FORCE-SUMMARY is non-nil or when called interactively, show a summary messa (with-editor-async-shell-command "direnv edit" nil nil)) (direnv-update-environment)) +;;;###autoload +(defun direnv-allow () + "Run ‘direnv allow’ and update the environment afterwards." + (interactive) + (call-process (direnv--detect) nil 0 nil "allow") + (direnv-update-environment)) + ;;;###autoload (define-minor-mode direnv-mode "Global minor mode to automatically update the environment using direnv.