mirror of https://github.com/Hilbis/Hilbish
feat: adds some friendly tips describing things about hilbish like features, documentation, etc.
parent
8a1614ab59
commit
b38189355b
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
## [2.3.0] - 2024-07-20
|
## [2.3.0] - 2024-07-20
|
||||||
### Added
|
### Added
|
||||||
|
- `nature.opts.tips` was added to randomly generate tips on start up.
|
||||||
|
Follows the pattern of motd and greeting. Displays after greeting on start up.
|
||||||
|
### Added
|
||||||
- `commander.registry` function to get all registered commanders.
|
- `commander.registry` function to get all registered commanders.
|
||||||
- `fs.pipe` function to get a pair of connected files (a pipe).
|
- `fs.pipe` function to get a pair of connected files (a pipe).
|
||||||
- Added an alternative 2nd parameter to `hilbish.run`, which is `streams`.
|
- Added an alternative 2nd parameter to `hilbish.run`, which is `streams`.
|
||||||
|
|
|
@ -14,7 +14,8 @@ The nice lil shell for {blue}Lua{reset} fanatics!
|
||||||
motd = true,
|
motd = true,
|
||||||
fuzzy = false,
|
fuzzy = false,
|
||||||
notifyJobFinish = true,
|
notifyJobFinish = true,
|
||||||
crimmas = true
|
crimmas = true,
|
||||||
|
tips = true
|
||||||
}
|
}
|
||||||
|
|
||||||
for optsName, default in pairs(defaultOpts) do
|
for optsName, default in pairs(defaultOpts) do
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
local bait = require 'bait'
|
||||||
|
local lunacolors = require 'lunacolors'
|
||||||
|
|
||||||
|
PREAMBLE = [[
|
||||||
|
Getting Started: https://rosettea.github.io/Hilbish/docs/getting-started/
|
||||||
|
Documentation: https://rosettea.github.io/Hilbish/
|
||||||
|
Github: https://github.com/Rosettea/Hilbish
|
||||||
|
]]
|
||||||
|
|
||||||
|
hilbish.tips = {
|
||||||
|
"Join the discord and say hi! -> https://discord.gg/3PDdcQz",
|
||||||
|
"{green}hilbish.alias{reset} -> Sets an alias to another cmd",
|
||||||
|
"{green}hilbish.appendPath{reset} -> Appends the provided dir to the command path ($PATH)",
|
||||||
|
"{green}hilbish.appendPath{reset} -> Appends the provided dir to the command path ($PATH)",
|
||||||
|
[[
|
||||||
|
Add Lua-written commands with the commander module!
|
||||||
|
Checkout the docs here -> https://rosettea.github.io/Hilbish/docs/api/commander/
|
||||||
|
]]
|
||||||
|
}
|
||||||
|
|
||||||
|
bait.catch('hilbish.init', function()
|
||||||
|
if hilbish.interactive and hilbish.opts.tip then
|
||||||
|
local idx = math.random(1, #hilbish.tips)
|
||||||
|
print(lunacolors.format(PREAMBLE .. "\nTip: " .. hilbish.tips[idx]))
|
||||||
|
end
|
||||||
|
end)
|
Loading…
Reference in New Issue