summary refs log tree commit diff stats
path: root/user/settings/fish/functions/magit.fish
diff options
context:
space:
mode:
Diffstat (limited to 'user/settings/fish/functions/magit.fish')
-rw-r--r--user/settings/fish/functions/magit.fish8
1 files changed, 8 insertions, 0 deletions
diff --git a/user/settings/fish/functions/magit.fish b/user/settings/fish/functions/magit.fish
new file mode 100644
index 00000000..96c90096
--- /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 --suppress-output --eval "(magit-status \"$argv[1]\")"
+end