From ce43480bb58c61fd90de4a94b414833779b8b554 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 31 Jan 2021 07:47:15 -0500 Subject: [PATCH] Add tf init and sops run-command recipes; switch to async-shell run method --- emacs/.emacs.d/init.org | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 0087683..d1a785b 100755 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -6520,6 +6520,8 @@ current buffer: ".tf" eol)) (list + (list :command-name "init" + :command-line "terraform init") (list :command-name "plan" :command-line "terraform plan") (list :command-name "apply" @@ -6647,11 +6649,19 @@ current buffer: :command-line "kustomize build --enable_alpha_plugins" :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 (leader-map "\"" #'run-command) (run-command-term-minor-mode-map [remap recompile] #'run-command-term-recompile) :custom - (run-command-run-method 'term) + (run-command-run-method 'async-shell) (run-command-recipes '(run-command-recipe-terraform run-command-recipe-local run-command-recipe-package-json @@ -6660,7 +6670,8 @@ current buffer: run-command-recipe-project-local run-command-recipe-executables run-command-recipe-obelix - run-command-recipe-kustomize))) + run-command-recipe-kustomize + run-command-recipe-sops))) #+end_src