From 53212e519adee9a72810a63a041fc063b4fcc26c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 18 May 2024 11:24:20 +0200 Subject: fish: add functions to open magit/dired in emacs --- user/settings/fish/functions/dired.fish | 8 ++++++++ user/settings/fish/functions/magit.fish | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 user/settings/fish/functions/dired.fish create mode 100644 user/settings/fish/functions/magit.fish (limited to 'user') 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 -- cgit 1.4.1