-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
developmentStandard developmentStandard development
Description
Specification
As per the #32 issue refactor, we need to implement a simplified cat command as secrets cat.
This will function identically to cat while omitting some of the options for now. It pretty much combines the functionality of read and write commands along with the concatination cat is known for.
Uses are
- read the contents of a secret
secrets cat secretPathor filesecrets cat filePath. - write the
stdinto a secretcat > secretPathor filecat > filePath.stdinwill support pipes as well. - concatenating files together in the output.
secrets cat secretPath filePath secretPath/*.
Pretty much the the functionality boils down to two things
- Will output the contents of all specified files to
stdoutin the order they are specified. - If no files are specified then it will just output
stdintostdout.
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
- Create a
secrets catcommand - If no arguments are provided it will take
stdinand output tostdout. - If arguments are provided it will write their contents to
stdoutin the order they are provided. - Support specifying normal files along side secret paths.
- Support specifying wildcards and possibly globbing for the paths.
Support redirecton into a secret using(see comment)secretPathsyntax. Failing that provide an option that handles that behaviour.
Metadata
Metadata
Assignees
Labels
developmentStandard developmentStandard development