Added the current version's commands.
parent
d1e874ed47
commit
b1238040e8
97
Commands.md
97
Commands.md
@ -51,3 +51,100 @@ 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).**
|
**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
|
||||||
|
These are each command that has been implemented by default in SrcMod.
|
||||||
|
|
||||||
|
### `base`
|
||||||
|
|
||||||
|
#### `cd`
|
||||||
|
Changes the current working directory to a specified new directory.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- newLocalPath: `string`
|
||||||
|
- The new directory to switch to (directory can be relative)
|
||||||
|
|
||||||
|
#### `clear`
|
||||||
|
Clears the shell buffer.
|
||||||
|
|
||||||
|
#### `compress`
|
||||||
|
Compresses a file or folder into a given type.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- type: `CompressedFileType`
|
||||||
|
- The file encoding to use. Can currently only be `Zip`.
|
||||||
|
- source: `string?`
|
||||||
|
- The initial file or folder to compress.
|
||||||
|
- 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`
|
||||||
|
- The amount to compress the file.
|
||||||
|
- Default Value: `Optimal`
|
||||||
|
|
||||||
|
#### `del`
|
||||||
|
Deletes a file or directory
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- path: `string`
|
||||||
|
- The file or directory to delete.
|
||||||
|
|
||||||
|
#### `dir`
|
||||||
|
Lists every directory and file in the path given. This does not include subdirectories.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- path: `string`
|
||||||
|
- The path to search.
|
||||||
|
- Default Value: `.`
|
||||||
|
|
||||||
|
#### `echo`
|
||||||
|
Prints a given message.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- msg: `string`
|
||||||
|
- The message to print.
|
||||||
|
|
||||||
|
#### `exit`
|
||||||
|
Exit the shell. Another name for [`quit`](#quit)
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- code: `int`
|
||||||
|
- The exit code to close with.
|
||||||
|
- Default Value: `0`
|
||||||
|
|
||||||
|
#### `explorer`
|
||||||
|
Opens a given directory in File Explorer.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- path: `string`
|
||||||
|
- The path to open in File Explorer.
|
||||||
|
- Default Value: `.`
|
||||||
|
|
||||||
|
#### `history`
|
||||||
|
Prints the history of all reversable commands executed by the shell.
|
||||||
|
|
||||||
|
#### `permdel`
|
||||||
|
Permanently deletes a file or directory
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- path: `string`
|
||||||
|
- The path to permanently delete.
|
||||||
|
|
||||||
|
#### `srcmod`
|
||||||
|
How about you find out for yourself.
|
||||||
|
|
||||||
|
#### `quit`
|
||||||
|
Quit the shell.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- code: `int`
|
||||||
|
- The exit code to close with.
|
||||||
|
- Default Value: `0`
|
||||||
|
|
||||||
|
#### `undo`
|
||||||
|
Undoes a command or commands in the history *that can be undone*.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- amount: `int`
|
||||||
|
- The amount of commands to undo.
|
||||||
|
- Default Value: `1`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user