all repos — nixfiles @ 53212e519adee9a72810a63a041fc063b4fcc26c

System and user configuration, managed by nix and home-manager

fish: add functions to open magit/dired in emacs
Alan Pearce alan@alanpearce.eu
Sat, 18 May 2024 11:24:20 +0200
commit

53212e519adee9a72810a63a041fc063b4fcc26c

parent

4d649a35f2b26629705845a334dd11ce977eed98

2 files changed, 16 insertions(+), 0 deletions(-)

jump to
A user/settings/fish/functions/dired.fish
@@ -0,0 +1,8 @@+function dired
+    if set --query argv[1]
+        set --function repo $argv[1]
+    else
+        set --function repo $pwd
+    end
+    emacsclient -e "(magit-status \"$argv[1]\")"
+end
A user/settings/fish/functions/magit.fish
@@ -0,0 +1,8 @@+function magit
+    if set --query argv[1]
+        set --function repo $argv[1]
+    else
+        set --function repo $pwd
+    end
+    emacsclient -e "(magit-status \"$argv[1]\")"
+end