|
1 | 1 | local bait = require 'bait'
|
2 | 2 | local lunacolors = require 'lunacolors'
|
3 | 3 |
|
4 |
| -PREAMBLE = [[ |
5 |
| -Getting Started: https://rosettea.github.io/Hilbish/docs/getting-started/ |
6 |
| -{yellow}🛈 These tips can be disabled with hilbish.opts.tips = false{reset} |
| 4 | +local postamble = [[ |
| 5 | +{yellow}These tips can be disabled with {reset}{invert} hilbish.opts.tips = false {reset} |
7 | 6 | ]]
|
8 | 7 |
|
9 | 8 | hilbish.tips = {
|
10 |
| - "Join the discord and say hi! -> https://discord.gg/3PDdcQz", |
11 |
| - "{green}hilbish.alias{reset} -> Sets an alias to another cmd", |
12 |
| - "{green}hilbish.appendPath{reset} -> Appends the provided dir to the command path ($PATH)", |
13 |
| - "{green}hilbish.completions{reset} -> Are use to control suggestions when tab completing.", |
14 |
| - "{green}hilbish.message{reset} -> Simple notification system which can be used by other plugins and parts of the shell to notify the user of various actions.", |
| 9 | + 'Join the discord and say hi! {blue}https://discord.gg/3PDdcQz{reset}', |
| 10 | + '{green}hilbish.alias{reset} interface manages shell aliases. See more detail by running {blue}doc api hilbish.alias.', |
| 11 | + '{green}hilbish.appendPath(\'path\'){reset} -> Appends the provided dir to the command path ($PATH)', |
| 12 | + '{green}hilbish.completions{reset} -> Used to control suggestions when tab completing.', |
| 13 | + '{green}hilbish.message{reset} -> Simple notification system which can be used by other plugins and parts of the shell to notify the user of various actions.', |
15 | 14 | [[
|
16 |
| - {green}hilbish.opts{reset} -> Simple toggle or value options a user can set. |
17 |
| - - EX: hilbish.opts.greeting = false, will cause the greeting message on start-up to not display. |
18 |
| - ]], |
19 |
| - [[ |
20 |
| - {green}hilbish.runner{reset} -> The runner interface contains functions that allow the user to change how Hilbish interprets interactive input. |
21 |
| - - The default runners can run shell script and Lua code. |
22 |
| - ]], |
23 |
| - [[ |
24 |
| - Add Lua-written commands with the commander module! |
25 |
| - Checkout the docs here -> https://rosettea.github.io/Hilbish/docs/api/commander/ |
26 |
| - ]] |
| 15 | +{green}hilbish.opts{reset} -> Simple toggle or value options a user can set. |
| 16 | +You may disable the startup greeting by {invert}hilbish.opts.greeting = false{reset} |
| 17 | +]], |
| 18 | +[[ |
| 19 | +{green}hilbish.runner{reset} -> The runner interface contains functions to |
| 20 | +manage how Hilbish interprets interactive input. The default runners can run |
| 21 | +shell script and Lua code! |
| 22 | +]], |
| 23 | +[[ |
| 24 | +Add Lua-written commands with the commander module! |
| 25 | +Check the command {blue}doc api commander{reset} or the web docs: |
| 26 | +https://rosettea.github.io/Hilbish/docs/api/commander/ |
| 27 | +]] |
27 | 28 | }
|
28 | 29 |
|
29 | 30 | bait.catch('hilbish.init', function()
|
30 | 31 | if hilbish.interactive and hilbish.opts.tips then
|
31 | 32 | local idx = math.random(1, #hilbish.tips)
|
32 |
| - print(lunacolors.format(PREAMBLE .. "\nTip: " .. hilbish.tips[idx])) |
| 33 | + print(lunacolors.format('{yellow}🛈 Tip:{reset} ' .. hilbish.tips[idx] .. '\n' .. postamble)) |
33 | 34 | end
|
34 | 35 | end)
|
0 commit comments