Add pip recipe for run-command

This commit is contained in:
Jeremy Dormitzer 2021-02-26 16:47:18 -05:00
parent 50ed29d013
commit 4f8d3e4fec

View File

@ -183,6 +183,13 @@
:command-line "web-ext build"
:working-dir dir))))
(defun run-command-recipe-pip ()
(when (and (buffer-file-name)
(string-match-p ".*requirements.*txt$" (buffer-file-name)))
(list
(list :command-name "install"
:command-line (format "pip install -r %s" (buffer-file-name))))))
:general
(leader-map "\"" #'run-command)
(run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile)
@ -200,6 +207,7 @@
run-command-recipe-kustomize
run-command-recipe-sops
run-command-recipe-pytest
run-command-recipe-web-ext)))
run-command-recipe-web-ext
run-command-recipe-pip)))
(provide 'init-run-command)