updated the config command descriptions

That_One_Nerd 2023-04-25 18:05:53 -04:00
parent 100316039d
commit b6ed49adcd

@ -4,32 +4,36 @@ Commands are methods inside a [module](Modules) that the shell will execute when
## How to Use
Commands must be in a [module](Modules) to be recognized. Any commands not inside their respective modules will be ignored. Commands are declared by applying the `CommandAttribute` attribute in the namespace `SrcMod.Shell.Modules.ObjectModels` to a method. The method can be static and must always have a body. The return type must be `void` and all parameters must have the following types:
| Type |
|-|
| `sbyte` (`System.SByte`) |
| `byte` (`System.Byte`) |
| `short` (`System.Int16`) |
| `ushort` (`System.UInt16`) |
| `int` (`System.Int32`) |
| `uint` (`System.UInt32`) |
| `long` (`System.Int64`) |
| `ulong` (`System.UInt64`) |
| `System.Int128` |
| `System.UInt128` |
| `nint` (`System.IntPtr`) |
| `nuint` (`System.UIntPtr`) |
| `System.Half` |
| `float` (`System.Single`) |
| `double` (`System.Double`) |
| `decimal` (`System.Decimal`) |
| `char` (`System.Char`) |
| `System.DateOnly` |
| `System.DateTime` |
| `System.DateTimeOffset` |
| `System.Enum` |
| `System.Guid` |
| `System.TimeOnly` |
| `System.TimeSpan` |
<details>
<summary>Allowed Types</summary>
- `sbyte` (`System.SByte`)
- `byte` (`System.Byte`)
- `short` (`System.Int16`)
- `ushort` (`System.UInt16`)
- `int` (`System.Int32`)
- `uint` (`System.UInt32`)
- `long` (`System.Int64`)
- `ulong` (`System.UInt64`)
- `System.Int128`
- `System.UInt128`
- `nint` (`System.IntPtr`)
- `nuint` (`System.UIntPtr`)
- `System.Half`
- `float` (`System.Single`)
- `double` (`System.Double`)
- `decimal` (`System.Decimal`)
- `char` (`System.Char`)
- `System.DateOnly`
- `System.DateTime`
- `System.DateTimeOffset`
- `System.Enum`
- `System.Guid`
- `System.TimeOnly`
- `System.TimeSpan`
</details>
---
Here is an example:
```csharp
@ -374,72 +378,61 @@ Parameters:
### `config`
#### `config add`, `config append`
Appends an item to a configuration variable. The variable in question must be a list.
Appends a single item to a config variable. The variable in question must be a list.
Parameters:
- name: `string`
- The name of the configuration variable.
- Possible Values:
- "GameDirectories"
- The specific variable to append to. Should be the name of a config variable (not case sensitive).
- value: `string`
- The value to append to the configuration variable.
- The value to append to the list. Must be parsable into an object that has the same type as the list elements (or can cast to it).
---
#### `config delete`, `config remove`
Removes a single item from a configuration variable. The variable in question must be a list.
Removes a single item to a config variable. The variable in question must be a list.
Parameters:
- name: `string`
- The name of the configuration variable.
- Possible Values:
- "GameDirectories"
- The specific variable to remove from. Should be the name of a config variable (not case sensitive).
- value: `string`
- The value to remove from the configuration variable.
- The value to remove from the list. Must be parsable into an object that has the same type as the list elements (or can cast to it).
---
#### `config display`, `config list`
Displays the configuration information on the console. Depending on the value of the parameter `mode`, the shell may display a single configuration option or multiple configuration options.
Displays config information about the shell.
Parameters:
- mode: `ConfigDisplayMode`
- The type of information to display.
- Default Value: `All`
- Possible Values:
- `Raw`
- Displays all configuration info in raw format.
- `All`
- Displays all configuration info in a styled format.
- `GameDirectories`
- Displays the list of accepted Steam game directories to search in.
- `RunUnsafeCommands`
- Displays whether or not the shell executes unsafe commands without prompting the user.
- display: `string`
- The specific variable to display. Should be the name of a config variable (not case sensitive).
- Special cases:
- "all"
- The command displays all config variables at once.
- "raw"
- The command displays the raw, JSON-formatted config.
- Default Value: "all"
---
#### `config reset`
Resets a single or multiple configuration variables to their default values.
Resets a config variable or variables to their default value or values.
Parameters:
- name: `string`
- The name of the configuration variable.
- Possible Values:
- "All"
- "GameDirectories"
- "RunUnsafeCommands"
- display: `string`
- The specific variable to reset. Should be the name of a config variable (not case sensitive).
- Special cases:
- "all"
- The command resets all config variables to their default values.
- Default Value: "all"
#### `config set`
Changes the value of a single configuration variable. The variable in question must be a single value.
Sets a config variable to a new value. Cannot change a list config variable, the variable changed must have a single value.
Parameters:
- name: `string`
- The name of the configuration variable to set.
- Possible Values:
- "GameDirectories"
- "RunUnsafeCommands"
- The specific variable to change. Should be the name of a config variable (not case sensitive).
- value: `string`
- The value to set to the variable.
- The new value to set the variable to. Must be parsable into an object that has the same type as the variable.
---