From fc5c75a630558e8530c2197b393e0e2a16adec28 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 1 Oct 2018 12:33:23 +0900 Subject: [PATCH] Add my-dired-git-ls-files --- emacs.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/emacs.el b/emacs.el index 6399381..f621ec9 100644 --- a/emacs.el +++ b/emacs.el @@ -1983,10 +1983,16 @@ use for the buffer. It defaults to \"*recetf-show*\"." ;; It works! ;; (pop-to-buffer (dired-noselect '("." "shrc" "emacs.el"))) -(defun my-dired-from-git-ls-files () +(defun my-dired-git-ls-files () "Dired from git ls-files." (interactive) - (dired ".")) + (pop-to-buffer-same-window + (dired-noselect `(,default-directory + ,@(split-string (shell-command-to-string "git ls-files -z") + "\0" t)) + "")) + ) + ;; Local Variables: ;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)