Compare commits

..

3 Commits

Author SHA1 Message Date
Jeremy Dormitzer
ce43480bb5 Add tf init and sops run-command recipes; switch to async-shell run method 2021-01-31 07:47:15 -05:00
Jeremy Dormitzer
511e5b56f8 Specify fork branch 2021-01-31 07:46:55 -05:00
Jeremy Dormitzer
2e8e51584c Only do with-editor stuff after with-editor loads 2021-01-31 07:46:37 -05:00

View File

@ -1585,10 +1585,11 @@ Open files in Git forges (GitHub, GitLab, etc.):
A utility from the author of Magit to run shell commands using the current Emacs instance as $EDITOR. A utility from the author of Magit to run shell commands using the current Emacs instance as $EDITOR.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(with-eval-after-load 'with-editor
(shell-command-with-editor-mode) (shell-command-with-editor-mode)
(add-hook 'shell-mode-hook #'with-editor-export-editor) (add-hook 'shell-mode-hook #'with-editor-export-editor)
(add-hook 'term-exec-hook #'with-editor-export-editor) (add-hook 'term-exec-hook #'with-editor-export-editor)
(add-hook 'eshell-mode-hook #'with-editor-export-editor) (add-hook 'eshell-mode-hook #'with-editor-export-editor))
#+END_SRC #+END_SRC
* Password Store * Password Store
@ -6510,7 +6511,7 @@ current buffer:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package run-command (use-package run-command
:straight (run-command :host github :repo "bard/emacs-run-command" :straight (run-command :host github :repo "bard/emacs-run-command"
:fork (:host github :repo "jdormit/emacs-run-command")) :fork (:host github :repo "jdormit/emacs-run-command" :branch "master"))
:config :config
(defun run-command-recipe-terraform () (defun run-command-recipe-terraform ()
(when (directory-files default-directory (when (directory-files default-directory
@ -6519,6 +6520,8 @@ current buffer:
".tf" ".tf"
eol)) eol))
(list (list
(list :command-name "init"
:command-line "terraform init")
(list :command-name "plan" (list :command-name "plan"
:command-line "terraform plan") :command-line "terraform plan")
(list :command-name "apply" (list :command-name "apply"
@ -6646,11 +6649,19 @@ current buffer:
:command-line "kustomize build --enable_alpha_plugins" :command-line "kustomize build --enable_alpha_plugins"
:working-dir dir)))) :working-dir dir))))
(defun run-command-recipe-sops ()
(when (save-excursion
(goto-char (point-min))
(search-forward-regexp "sops:" nil t))
(list
(list :command-name "edit"
:command-line (format "sops %s" (buffer-file-name))))))
:general :general
(leader-map "\"" #'run-command) (leader-map "\"" #'run-command)
(run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile) (run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile)
:custom :custom
(run-command-run-method 'term) (run-command-run-method 'async-shell)
(run-command-recipes '(run-command-recipe-terraform (run-command-recipes '(run-command-recipe-terraform
run-command-recipe-local run-command-recipe-local
run-command-recipe-package-json run-command-recipe-package-json
@ -6659,7 +6670,8 @@ current buffer:
run-command-recipe-project-local run-command-recipe-project-local
run-command-recipe-executables run-command-recipe-executables
run-command-recipe-obelix run-command-recipe-obelix
run-command-recipe-kustomize))) run-command-recipe-kustomize
run-command-recipe-sops)))
#+end_src #+end_src