2024-07-20 23:33:33 +00:00
local bait = require ' bait '
local lunacolors = require ' lunacolors '
2024-07-21 21:17:23 +00:00
PREAMBLE = [ [
Getting Started : https : // rosettea.github . io / Hilbish / docs / getting - started /
2024-07-21 22:03:04 +00:00
{ yellow } 🛈 These tips can be disabled with hilbish.opts . tips = false { reset }
2024-07-21 21:17:23 +00:00
] ]
2024-07-20 23:33:33 +00:00
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) " ,
2024-07-21 00:21:04 +00:00
" {green}hilbish.completions{reset} -> Are use to control suggestions when tab completing. " ,
" {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. " ,
[ [
{ green } hilbish.opts { reset } -> Simple toggle or value options a user can set .
- EX : hilbish.opts . greeting = false , will cause the greeting message on start - up to not display .
] ] ,
[ [
{ green } hilbish.runner { reset } -> The runner interface contains functions that allow the user to change how Hilbish interprets interactive input .
- The default runners can run shell script and Lua code .
] ] ,
2024-07-20 23:33:33 +00:00
[ [
2024-07-21 00:21:04 +00:00
Add Lua - written commands with the commander module !
2024-07-20 23:33:33 +00:00
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 .. " \n Tip: " .. hilbish.tips [ idx ] ) )
end
end )