Skip to content

Add command line option to set & view default options #2

@delphidabbler

Description

@delphidabbler

At present the only way to configure PasHi is to create a file named config in PasHi's data directory at %APPDATA%\DelphiDabbler\PasHi.

It would be useful to be able to write configuration information to the config file from the command line.

A command line option could be added to do this that is similar to git config: something like pashi --options.

For example

  • --options set command=param or --options set command would write the given command to the config file, with any required parameter. Setting the same option twice would replace any parameter in the config file. For a parameter-less option this would be a no-op.
  • --options check command would indicate if a command was present in the config file or not. For a command with a parameter the parameter would be displayed.
  • --options show would display all current options in the config file.
  • --options delete command would remove the given command from the config file. An error would be reported if the command wasn't present.
  • --options purge would remove all options from the config file (or delete the file).

It would be useful if commands being set could be validated.

The command should also prevent any blacklisted commands from being written to the config file. Blacklisted commands (i.e. those that aren't valid in the config file) should be help and options.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions