commit d913dde081bf3ef76b2e7aab4217f18956171a76
parent c60a980b18f7d3dd0962b8eeeddc15a462413302
Author: Anders Hedman <anders.hedman01@gmail.com>
Date: Sun, 20 Oct 2024 09:34:27 +0200
Enable direnv
Diffstat:
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.bashrc b/.bashrc
@@ -69,3 +69,5 @@ export PS1="\[\e[1;32m\]┌──[\[\e[0;36m\]\u\[\e[0;32m\]@\[\e[0;31m\]\h\[\e[
# ~/Scripts/pfetch
complete -C /usr/bin/vault vault
+
+eval "$(direnv hook bash)"
diff --git a/.doom.d/config.el b/.doom.d/config.el
@@ -330,3 +330,19 @@
(use-package! elpher
:config
(setq elpher-default-url-type "gemini"))
+
+(defun set-exec-path-from-shell-PATH ()
+ "Set up Emacs' `exec-path' and PATH environment variable to match
+that used by the user's shell.
+
+This is particularly useful under Mac OS X and macOS, where GUI
+apps are not started from a shell."
+ (interactive)
+ (let ((path-from-shell (replace-regexp-in-string
+ "[ \t\n]*$" "" (shell-command-to-string
+ "$SHELL --login -c 'echo $PATH'"
+ ))))
+ (setenv "PATH" path-from-shell)
+ (setq exec-path (split-string path-from-shell path-separator))))
+
+;; (set-exec-path-from-shell-PATH)
diff --git a/.doom.d/init.el b/.doom.d/init.el
@@ -89,7 +89,7 @@
ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
- ;;direnv
+ direnv
(docker +lsp)
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs