@kyanny's blog

My thoughts, my life. Views/opinions are my own.

ivy で ghq

~/.emacs なり ~/.spacemacs なりに書く。 M-x my/ivy-ghq で実行。

  (defun my/ivy-ghq ()
    "ghq list -p => find-file (dired)"
    (interactive)
    (ivy-read "ghq: "
              (split-string (shell-command-to-string "ghq list -p") "\n")
              :require-match t
              :action (lambda (path)
                        (find-file path))
              :caller 'my/ivy-ghq))