summary refs log tree commit diff stats
path: root/user/settings/fish/functions
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings/fish/functions')
-rw-r--r--user/settings/fish/functions/dired.fish8
-rw-r--r--user/settings/fish/functions/magit.fish8
2 files changed, 16 insertions, 0 deletions
diff --git a/user/settings/fish/functions/dired.fish b/user/settings/fish/functions/dired.fish
new file mode 100644
index 00000000..97174b35
--- /dev/null
+++ b/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
diff --git a/user/settings/fish/functions/magit.fish b/user/settings/fish/functions/magit.fish
new file mode 100644
index 00000000..048fd42f
--- /dev/null
+++ b/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