Skip to content

Commit e4df61f

Browse files
committed
fix(nature/tips): cleanup tips display
1 parent 54b85b1 commit e4df61f

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

nature/opts/tips.lua

+21-20
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
local bait = require 'bait'
22
local lunacolors = require 'lunacolors'
33

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}
76
]]
87

98
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.',
1514
[[
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+
]]
2728
}
2829

2930
bait.catch('hilbish.init', function()
3031
if hilbish.interactive and hilbish.opts.tips then
3132
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))
3334
end
3435
end)

0 commit comments

Comments
 (0)