Skip to content

Expand secrets env command formatting options #144

@tegefaulkes

Description

@tegefaulkes

Specification

There are a few parts to this.

First, we need to expand the range of formats available. While the basic linux ones are are supported we're missing formats useful for windows CMD and Powershell.

Second, while I appended the dotenv and prepend format to the --format choices. It seems this added the choices to all of the commands. This was unintended and needs to be fixed. This means the hacky implementation needs to be replaced by removing the format option from the CommandPolykey constructor and making each command add the format option themselves. This means all commands need to be updated. Then select commands can add their own custom --format if needed.

Thirdly, all of the format options need to be clearly explained as part of the secrets env --help help output.

Lastly, the --format option should default in such a way that the most appropriate platform specific format is used. This means we need to auto switch based on the platform.

Additional context

Tasks

  • 1. expand the format options to include windows specific env formats.
  • 2. Fix how the --format option is modified. It's currently changed globally but that is unintended.
  • 3. The help output needs to be expanded to explain all of the different format outputs.
  • 4. the --format option should default to the most appropriate env format for the platform/terminal it is run in. We can switch based on platform but it would be advantageous to detect CMD or Powershell on windows.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions