-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secret editor on the CLI #78
Labels
Comments
robert-cronin
added
enhancement
New feature or request
development
Standard development
labels
Aug 12, 2020
Here you would use `$EDITOR` as the default editor. If it is not defined we may just error out.
…On 12 August 2020 13:18:15 GMT+10:00, Robbie Cronin ***@***.***> wrote:
This issue is based on
#30 (comment)
Basically we want to be able to do something like
```
pk secrets ed vault1:secret1
```
and have it open in the default editor.
Here is how you do it in shell:
```
tmpfile=$(mktemp /tmp/abc.XXXXXX)
exec {fd}<> "$tmpfile"
rm -f "$tmpfile"
vim "/proc/self/fd/$fd"
cat <&${fd}
```
we just need to figure out how to have it triggered in JavaScript
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#78
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Oh this is easy. Create a temporary file, open a fd to it, delete it the file on fs, write the secret contents to file, then open an editor the fd (which is read/write).
Note that the editor may be making a copy so we can't guarantee that they are editing the temporary file.
But when saved you can then take that fd and seek to beginning and then save to the secret.
However this is not that important yet so we can put this at lower priority.
…On 12 August 2020 13:18:15 GMT+10:00, Robbie Cronin ***@***.***> wrote:
This issue is based on
#30 (comment)
Basically we want to be able to do something like
```
pk secrets ed vault1:secret1
```
and have it open in the default editor.
Here is how you do it in shell:
```
tmpfile=$(mktemp /tmp/abc.XXXXXX)
exec {fd}<> "$tmpfile"
rm -f "$tmpfile"
vim "/proc/self/fd/$fd"
cat <&${fd}
```
we just need to figure out how to have it triggered in JavaScript
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#78
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Closing on account of migration to gitlab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is based on #30 (comment)
Basically we want to be able to do something like
and have it open in the default editor.
Here is how you do it in shell:
we just need to figure out how to have it triggered in JavaScript
The text was updated successfully, but these errors were encountered: