Updated the Wiki to match the latest release (I hope).
parent
0ae96ca69e
commit
b302bbe2f6
118
Commands.md
118
Commands.md
@ -50,8 +50,6 @@ As said earlier, commands can have parameters as long as they fit the earlier gi
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Note: When using the `srcmod.dll` to add additional custom modules, the new modules will not be recognized due to a reflection bug. This will be fixed in the near future (see issue #2).**
|
|
||||||
|
|
||||||
## Default Commands
|
## Default Commands
|
||||||
These are each command that has been implemented by default in SrcMod.
|
These are each command that has been implemented by default in SrcMod.
|
||||||
|
|
||||||
@ -71,20 +69,25 @@ Clears the shell buffer.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### `compress`
|
#### `copy`
|
||||||
Compresses a file or folder into a given type.
|
Copies a file or directory to a new location.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- type: `CompressedFileType`
|
- source: `string`
|
||||||
- The file encoding to use. Can currently only be `Zip`.
|
- The original location of the file or directory.
|
||||||
- source: `string?`
|
- destination: `string`
|
||||||
- The initial file or folder to compress.
|
- The new location for the file or directory.
|
||||||
- destination: `string?`
|
|
||||||
- The destination file. If set to `null`, the destination will be implied to have the same name as `source` and be located in the same parent directory.
|
---
|
||||||
- Default Value: `null`
|
|
||||||
- level: `CompressionLevel`
|
#### `cut`
|
||||||
- The amount to compress the file.
|
Moves a file or directory to a new location on the computer. Identical to [`move`](#move).
|
||||||
- Default Value: `Optimal`
|
|
||||||
|
Parameters:
|
||||||
|
- source: `string`
|
||||||
|
- The original location of the file or directory.
|
||||||
|
- destination: `string`
|
||||||
|
- The new location for the file or directory.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -117,7 +120,7 @@ Parameters:
|
|||||||
---
|
---
|
||||||
|
|
||||||
#### `exit`
|
#### `exit`
|
||||||
Exit the shell. Another name for [`quit`](#quit)
|
Exit the shell. Identical to [`quit`](#quit)
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- code: `int`
|
- code: `int`
|
||||||
@ -141,8 +144,19 @@ Prints the history of all reversable commands executed by the shell.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### `move`
|
||||||
|
Moves a file or directory to a new location on the computer. Identical to [`cut`](#cut).
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- source: `string`
|
||||||
|
- The original location of the file or directory.
|
||||||
|
- destination: `string`
|
||||||
|
- The new location for the file or directory.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
#### `permdel`
|
#### `permdel`
|
||||||
Permanently deletes a file or directory
|
Permanently deletes a file or directory.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- path: `string`
|
- path: `string`
|
||||||
@ -150,6 +164,24 @@ Parameters:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### `print`
|
||||||
|
Prints the contents of a given file to the console. Identical to [`type`](#type).
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- file: `string`
|
||||||
|
- The path of the file to print.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `sleep`
|
||||||
|
Wait for a given amount of milliseconds.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- timeMs: `int`
|
||||||
|
- The amount of time to wait in milliseconds.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
#### `srcmod`
|
#### `srcmod`
|
||||||
How about you find out for yourself.
|
How about you find out for yourself.
|
||||||
|
|
||||||
@ -165,6 +197,15 @@ Parameters:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### `type`
|
||||||
|
Prints the contents of a given file to the console. Identical to [`print`](#print).
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- file: `string`
|
||||||
|
- The path of the file to print.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
#### `undo`
|
#### `undo`
|
||||||
Undoes a command or commands in the history *that can be undone*.
|
Undoes a command or commands in the history *that can be undone*.
|
||||||
|
|
||||||
@ -172,3 +213,48 @@ Parameters:
|
|||||||
- amount: `int`
|
- amount: `int`
|
||||||
- The amount of commands to undo.
|
- The amount of commands to undo.
|
||||||
- Default Value: `1`
|
- Default Value: `1`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `clipboard`
|
||||||
|
|
||||||
|
#### `clipboard clear`
|
||||||
|
Clears the clipboard of all data currently copied in it. This is technically an unsafe command, though it likely won't fail.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `clipboard copy`
|
||||||
|
Copies a given string of data into the clipboard. This is technically considered an unsafe command, though it likely won't fail.
|
||||||
|
|
||||||
|
This is kind of a redundant command, and might be deleted in the future.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- text: `string`
|
||||||
|
- The text to copy into the clipboard. Must be in the UTF-8 format.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `clipboard view`
|
||||||
|
View the text currently stored in your clipboard. Due to some issues with clipboard formats, the command can only view text in the clipboard, not any other data. This is technically an unsafe command, though it likely won't fail.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `compress`
|
||||||
|
|
||||||
|
#### `compress zip`
|
||||||
|
Compresses a file or directory into a single `.zip` file.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- source: `string`
|
||||||
|
- The original location of the file or directory.
|
||||||
|
- destination: `string?`
|
||||||
|
- The destination for the compressed file or directory. If set to `null`, it will be determined automatically.
|
||||||
|
- Default Value: `null`
|
||||||
|
- level: `CompressionLevel`
|
||||||
|
- The level of compression for the `.zip` file. The compression level also changes the time it takes to compress.
|
||||||
|
- Default Value: `Optimal`
|
||||||
|
- Possible Values:
|
||||||
|
- `Optimal`
|
||||||
|
- `Fastest`
|
||||||
|
- `NoCompression`
|
||||||
|
- `SmallestSize`
|
||||||
|
|||||||
@ -42,3 +42,5 @@ These are the name, prefix, and brief descriptions of each module implemented by
|
|||||||
| Class Name | Prefix | Description |
|
| Class Name | Prefix | Description |
|
||||||
|-|-|-|
|
|-|-|-|
|
||||||
| `BaseModule` | `base` (not prefixed) | A module with most system commands. Does not contain any modding functionality. |
|
| `BaseModule` | `base` (not prefixed) | A module with most system commands. Does not contain any modding functionality. |
|
||||||
|
| `ClipboardModule` | `clipboard` | A module that handles commands related to the system clipboard. |
|
||||||
|
| `CompressionModule` | `compress` | A module that handles compression to certain formats. |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user