From 2c8197e5d7813734d6a49f9b9c0b227b7ae022a8 Mon Sep 17 00:00:00 2001 From: Stig Brautaset Date: Thu, 29 Dec 2016 16:17:29 +0000 Subject: [PATCH] Support fish which uses "; and" rather than "&&" to join commands --- git-auto-commit-mode.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/git-auto-commit-mode.el b/git-auto-commit-mode.el index 08411a0..7652c99 100644 --- a/git-auto-commit-mode.el +++ b/git-auto-commit-mode.el @@ -51,6 +51,13 @@ If non-nil a git push will be executed after each commit." :group 'git-auto-commit-mode :type 'boolean) +(defcustom gac-shell-and " && " + "How to join commands together in the shell. For fish shell, + you want to customise this to: \" ; and \" instead of the default." + :tag "Join shell commands" + :group 'git-auto-commit-mode + :type 'string) + (defun gac-relative-file-name (filename) "Find the path to FILENAME relative to the git directory." (let* ((git-dir @@ -111,7 +118,8 @@ Default to FILENAME." (default-directory (file-name-directory buffer-file))) (shell-command (concat "git add " (shell-quote-argument filename) - " && git commit -m " (shell-quote-argument commit-msg))))) + gac-shell-and + "git commit -m " (shell-quote-argument commit-msg))))) (defun gac-push () "Push commits to the current upstream.