mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-29 08:53:24 +00:00
Created Functions (markdown)
parent
dd4494ad14
commit
7faf97e0f9
32
Functions.md
Normal file
32
Functions.md
Normal file
@ -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 '.. '
|
||||||
|
```
|
||||||
|

|
Loading…
x
Reference in New Issue
Block a user