From 9d706daf54bfe1fe27545bdc902a37eaa3cfa20b Mon Sep 17 00:00:00 2001
From: Vedang Manerikar <ved.manerikar@gmail.com>
Date: Thu, 19 Dec 2024 10:42:40 +0530
Subject: [PATCH] Hook zoxide into consult-after-jump as well

---
 unravel-emacs.org                | 7 ++++---
 unravel-modules/unravel-shell.el | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/unravel-emacs.org b/unravel-emacs.org
index b300fda..8d02c3c 100644
--- a/unravel-emacs.org
+++ b/unravel-emacs.org
@@ -4860,9 +4860,10 @@ of different paths inside Zoxide. This is how to do it:
   (when (executable-find "zoxide")
     (use-package zoxide
       :ensure t
-      :config
-      (add-hook 'find-file-hook #'zoxide-add)
-      (add-hook 'dired-mode-hook #'zoxide-add)))
+      :hook
+      (consult-after-jump-hook . zoxide-add)
+      (find-file-hook . zoxide-add)
+      (dired-mode-hook . zoxide-add)))
 #+end_src
 
 ** The =unravel-shell.el= section for writing fish configuration (~fish-mode~)
diff --git a/unravel-modules/unravel-shell.el b/unravel-modules/unravel-shell.el
index 36121c0..0883d0e 100644
--- a/unravel-modules/unravel-shell.el
+++ b/unravel-modules/unravel-shell.el
@@ -10,9 +10,10 @@
 (when (executable-find "zoxide")
   (use-package zoxide
     :ensure t
-    :config
-    (add-hook 'find-file-hook #'zoxide-add)
-    (add-hook 'dired-mode-hook #'zoxide-add)))
+    :hook
+    (consult-after-jump-hook . zoxide-add)
+    (find-file-hook . zoxide-add)
+    (dired-mode-hook . zoxide-add)))
 
 ;; Mode to read/write fish functions and files
 (use-package fish-mode