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 ## 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: 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 | <details>
|-| <summary>Allowed Types</summary>
| `sbyte` (`System.SByte`) |
| `byte` (`System.Byte`) | - `sbyte` (`System.SByte`)
| `short` (`System.Int16`) | - `byte` (`System.Byte`)
| `ushort` (`System.UInt16`) | - `short` (`System.Int16`)
| `int` (`System.Int32`) | - `ushort` (`System.UInt16`)
| `uint` (`System.UInt32`) | - `int` (`System.Int32`)
| `long` (`System.Int64`) | - `uint` (`System.UInt32`)
| `ulong` (`System.UInt64`) | - `long` (`System.Int64`)
| `System.Int128` | - `ulong` (`System.UInt64`)
| `System.UInt128` | - `System.Int128`
| `nint` (`System.IntPtr`) | - `System.UInt128`
| `nuint` (`System.UIntPtr`) | - `nint` (`System.IntPtr`)
| `System.Half` | - `nuint` (`System.UIntPtr`)
| `float` (`System.Single`) | - `System.Half`
| `double` (`System.Double`) | - `float` (`System.Single`)
| `decimal` (`System.Decimal`) | - `double` (`System.Double`)
| `char` (`System.Char`) | - `decimal` (`System.Decimal`)
| `System.DateOnly` | - `char` (`System.Char`)
| `System.DateTime` | - `System.DateOnly`
| `System.DateTimeOffset` | - `System.DateTime`
| `System.Enum` | - `System.DateTimeOffset`
| `System.Guid` | - `System.Enum`
| `System.TimeOnly` | - `System.Guid`
| `System.TimeSpan` | - `System.TimeOnly`
- `System.TimeSpan`
</details>
---
Here is an example: Here is an example:
```csharp ```csharp
@ -374,72 +378,61 @@ Parameters:
### `config` ### `config`
#### `config add`, `config append` #### `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: Parameters:
- name: `string` - name: `string`
- The name of the configuration variable. - The specific variable to append to. Should be the name of a config variable (not case sensitive).
- Possible Values:
- "GameDirectories"
- value: `string` - 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` #### `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: Parameters:
- name: `string` - name: `string`
- The name of the configuration variable. - The specific variable to remove from. Should be the name of a config variable (not case sensitive).
- Possible Values:
- "GameDirectories"
- value: `string` - 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` #### `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: Parameters:
- mode: `ConfigDisplayMode` - display: `string`
- The type of information to display. - The specific variable to display. Should be the name of a config variable (not case sensitive).
- Default Value: `All` - Special cases:
- Possible Values: - "all"
- `Raw` - The command displays all config variables at once.
- Displays all configuration info in raw format. - "raw"
- `All` - The command displays the raw, JSON-formatted config.
- Displays all configuration info in a styled format. - Default Value: "all"
- `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.
--- ---
#### `config reset` #### `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: Parameters:
- name: `string` - display: `string`
- The name of the configuration variable. - The specific variable to reset. Should be the name of a config variable (not case sensitive).
- Possible Values: - Special cases:
- "All" - "all"
- "GameDirectories" - The command resets all config variables to their default values.
- "RunUnsafeCommands" - Default Value: "all"
#### `config set` #### `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: Parameters:
- name: `string` - name: `string`
- The name of the configuration variable to set. - The specific variable to change. Should be the name of a config variable (not case sensitive).
- Possible Values:
- "GameDirectories"
- "RunUnsafeCommands"
- value: `string` - 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.
--- ---