You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find some sigil we haven't used yet, and teach safe to prompt for multi-line values via that.
What we've done so far:
safe set path/in/vault key=value # explicitly use "value"
safe set path/in/vault key@a/file # read from a/file
safe set path/in/vault key # prompt for value, newline terminates
Idea:
safe set path/in/vault key+
Have that open up the users editor of choice (via $EDITOR) and when they save, handle the tempfile output like a key<${tempfile} call. The buffer loaded into the editor should look like this:
# If there's a user prompt, yo I'll print it!
#
# Enter your secret below. Use as many lines as you wish!
# When you're done, save and quit your editor, and safe will
# continue on to the next secret.
# ------8<-----------------------------------------------
If we don't find a line that matches ^#\s+--+8<--+$, we save the whole buffer as the secret. Otherwise, we start at the first line after that match and save the rest of the buffer.
This will require some changes to how safe prompt is dealt with -- we need to keep the value of safe prompt that immediately preceded the call to set / paste, and display that in the first section of the comment above, with the key that we are entering. If no $EDITOR variable has been set, inform the user and bail.
The text was updated successfully, but these errors were encountered:
Find some sigil we haven't used yet, and teach safe to prompt for multi-line values via that.
What we've done so far:
Idea:
Have that open up the users editor of choice (via $EDITOR) and when they save, handle the tempfile output like a
key<${tempfile}
call. The buffer loaded into the editor should look like this:If we don't find a line that matches
^#\s+--+8<--+$
, we save the whole buffer as the secret. Otherwise, we start at the first line after that match and save the rest of the buffer.This will require some changes to how
safe prompt
is dealt with -- we need to keep the value ofsafe prompt
that immediately preceded the call toset
/paste
, and display that in the first section of the comment above, with the key that we are entering. If no $EDITOR variable has been set, inform the user and bail.The text was updated successfully, but these errors were encountered: