From 487d290217b6a67569b9e418f740a8472ab0640d Mon Sep 17 00:00:00 2001 From: Dominik Schulz Date: Fri, 24 Dec 2021 12:18:07 +0100 Subject: [PATCH] Add gopass process This commit adds the process command to process templates into full (configuration) files. Fixes #1913 RELEASE_NOTES=[ENHANCEMENT] Add gopass process Signed-off-by: Dominik Schulz --- docs/commands/process.md | 59 ++++++++++++++++++++++++++++++ internal/action/commands.go | 9 +++++ internal/action/process.go | 33 +++++++++++++++++ internal/action/process_test.go | 63 +++++++++++++++++++++++++++++++++ main_test.go | 3 +- pkg/tempfile/file_test.go | 1 - 6 files changed, 166 insertions(+), 2 deletions(-) create mode 100644 docs/commands/process.md create mode 100644 internal/action/process.go create mode 100644 internal/action/process_test.go diff --git a/docs/commands/process.md b/docs/commands/process.md new file mode 100644 index 0000000000..c467c902bf --- /dev/null +++ b/docs/commands/process.md @@ -0,0 +1,59 @@ +# `process` command + +The `process` command extends the `gopass` templating to support user-supplied +template files that will be processed and any necessary credential lookups will +be done while they are processed. That way users can store their full +configuration files publicly accessible and have any of the recipients +automatically populate it to generate a complete configuration file. + +`gopass process` writes the result to `STDOUT`. You'll likely want to redirect +it to a file. + +## Synopsis + +``` +$ gopass process