-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement secrets cat
command
#243
Comments
@aryanj you want to work on this one next after completing your current work. |
For streamlining the basic functionality. just focus on creating the cat command and having it handle multiple paths within a single vault. Don't worry about using the seralizer utility for now. I'm starting to think I need to review how it works and it's use based on what we've learned. Focus on tasks 1 and 3. Use a |
The current |
Create a separate PR for this and keep it simple. I'll need to have a look at MatrixAI/Polykey#799 and be more hands on with it later. For now we're just focusing on the simple implementations of the commands so we can build them up incrementally. |
It is not clear in the issue spec, but do we need to support concatenating files across multiple vaults? This comment requires this behaviour for The spec for |
The purpose of the The redirect operator Instead, another command will be written to take For this issue, redirection to another secret isn't part of the spec anymore. |
Demo please? Where's the gif. |
I forgot to upload the gif yesterday. Here it is: #282 (comment) |
Specification
As per the #32 issue refactor, we need to implement a simplified
cat
command assecrets cat
.This will function identically to
cat
while omitting some of the options for now. It pretty much combines the functionality ofread
andwrite
commands along with the concatinationcat
is known for.Uses are
secrets cat secretPath
or filesecrets cat filePath
.stdin
to a secretcat > secretPath
or filecat > filePath
.stdin
will support pipes as well.secrets cat secretPath filePath secretPath/*
.Pretty much the the functionality boils down to two things
stdout
in the order they are specified.stdin
tostdout
.Redirection into a secret path might not be possible with how commander parses inputs and how shell works, at least, not with the(see comment)cat > secretPath
syntax. We'll need to prototype that. If it doesn't work, we'd have to use an option--redirect secretPath
to enable the functionality.Additional context
Tasks
secrets cat
commandstdin
and output tostdout
.stdout
in the order they are provided.Support redirecton into a secret using(see comment)secretPath
syntax. Failing that provide an option that handles that behaviour.The text was updated successfully, but these errors were encountered: