diff --git a/Functions.md b/Functions.md new file mode 100644 index 0000000..5762054 --- /dev/null +++ b/Functions.md @@ -0,0 +1,32 @@ +Hilbish has a few global functions that are always accessible. Not else much to say + +### alias(aliasname, orig) +Creates an alias of `aliasname`, which points to `orig` + +#### Example +```lua +alias('cls', 'clear') +``` + +### prompt(text) +Sets the Hilbish prompt to `text`. + +There are a few verbs that can be used in the prompt text. These will be formatted and replaced with the appropriate values. +`%d` - Current working directory +`%u` - Name of current user +`%h` - Hostname of device + +#### Example +```lua +prompt '%u@%h %d' +``` + +### multiprompt(text) +Sets the Hilbish multiline prompt to `text`. +This is for when incomplete shell input is provided or the user chooses to continue the line. + +#### Example +```lua +multiprompt '.. ' +``` +![](https://modeus.is-inside.me/DoORwGIL.png) \ No newline at end of file