summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-07-25 03:37:00 +0200
committercashmere <cashmere@autistici.org>2026-07-25 03:37:32 +0200
commitff22286669c05e6aa666969ebab798d45219191f (patch)
tree9ba1462af57ec6bf4ef8f1ab039d2ca4f430da2f /config.org
parent6693bcd3a0a8505ffe841be4d2c1c1f3309c8b7c (diff)
downloademacs-ff22286669c05e6aa666969ebab798d45219191f.tar.gz
x12: add paths with zoxide when switching dirs with dired
Diffstat (limited to 'config.org')
-rw-r--r--config.org9
1 files changed, 8 insertions, 1 deletions
diff --git a/config.org b/config.org
index 406367a..5cd1ca7 100644
--- a/config.org
+++ b/config.org
@@ -3738,7 +3738,14 @@ moved to local.el
#+begin_src emacs-lisp
(use-package zoxide
- :ensure t)
+ :ensure t
+ :config
+ (defun my/zoxide-add-dired ()
+ "Append the current dired/dirvish directory to the zoxide database."
+ (when (and default-directory
+ (not (file-remote-p default-directory)))
+ (zoxide-add default-directory)))
+ (add-hook 'dired-after-readin-hook #'my/zoxide-add-dired))
#+end_src
* my/fns