From eab92f65759d4f95c43b3ec9efd93df72f3a29d1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 6 Jun 2017 15:15:08 +0200 Subject: Emacs: Add completion for yarn-run command --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index ff3ca5e3..acc92fc2 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -564,7 +564,8 @@ based upon some folder conventions I use. (cmd-to-echo "yarn" (concat "add " package)))) (defun yarn-run (cmd) - (interactive "scommand: ") + (interactive (list + (projectile-completing-read "command: " (alist-get 'scripts (json-read-file (expand-file-name "package.json" (projectile-project-root))))))) (projectile-with-default-dir (projectile-project-root) (cmd-to-echo "yarn" (concat "run " cmd)))) -- cgit 1.4.1