Support fish which uses "; and" rather than "&&" to join commands
This commit is contained in:
parent
075e5f9ded
commit
2c8197e5d7
1 changed files with 9 additions and 1 deletions
|
@ -51,6 +51,13 @@ If non-nil a git push will be executed after each commit."
|
||||||
:group 'git-auto-commit-mode
|
:group 'git-auto-commit-mode
|
||||||
:type 'boolean)
|
: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)
|
(defun gac-relative-file-name (filename)
|
||||||
"Find the path to FILENAME relative to the git directory."
|
"Find the path to FILENAME relative to the git directory."
|
||||||
(let* ((git-dir
|
(let* ((git-dir
|
||||||
|
@ -111,7 +118,8 @@ Default to FILENAME."
|
||||||
(default-directory (file-name-directory buffer-file)))
|
(default-directory (file-name-directory buffer-file)))
|
||||||
(shell-command
|
(shell-command
|
||||||
(concat "git add " (shell-quote-argument filename)
|
(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 ()
|
(defun gac-push ()
|
||||||
"Push commits to the current upstream.
|
"Push commits to the current upstream.
|
||||||
|
|
Loading…
Reference in a new issue