summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-06-06 15:15:08 +0200
committerAlan Pearce2017-06-06 15:15:08 +0200
commiteab92f65759d4f95c43b3ec9efd93df72f3a29d1 (patch)
treeef813fb88c772386cf8275a48e34ba6a4d3f72e7 /emacs
parenta67a49386bcbef7ad83706e41dc8842c4b0bac58 (diff)
downloadnixfiles-eab92f65759d4f95c43b3ec9efd93df72f3a29d1.tar.lz
nixfiles-eab92f65759d4f95c43b3ec9efd93df72f3a29d1.tar.zst
nixfiles-eab92f65759d4f95c43b3ec9efd93df72f3a29d1.zip
Emacs: Add completion for yarn-run command
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org3
1 files changed, 2 insertions, 1 deletions
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))))