mirror of https://github.com/Hilbis/Hilbish
Compare commits
No commits in common. "ea233facc87c61e55bca60f5dc6885f6307cc179" and "ddf5117fd99864f9b2c0a76d84d3220105bad541" have entirely different histories.
ea233facc8
...
ddf5117fd9
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -1,15 +1,9 @@
|
||||||
# 🎀 Changelog
|
# 🎀 Changelog
|
||||||
|
|
||||||
## [2.3.1] - 2024-07-27
|
## Unreleased
|
||||||
[hehe when you see it release](https://youtu.be/AaAF51Gwbxo?si=rhj2iYuQRkqDa693&t=64)
|
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- `nature.opts.tips` was added to display random tips on start up.
|
- `nature.opts.tips` was added to randomly generate tips on start up.
|
||||||
Displayed tips can be modified via the `hilbish.tips` table.
|
Follows the pattern of motd and greeting. Displays after greeting on start up.
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Fix a minor regression related to the cd command not working with relative paths
|
|
||||||
- Updated the motd for 2.3
|
|
||||||
|
|
||||||
## [2.3.0] - 2024-07-20
|
## [2.3.0] - 2024-07-20
|
||||||
### Added
|
### Added
|
||||||
|
@ -769,7 +763,6 @@ This input for example will prompt for more input to complete:
|
||||||
|
|
||||||
First "stable" release of Hilbish.
|
First "stable" release of Hilbish.
|
||||||
|
|
||||||
[2.3.1]: https://github.com/Rosettea/Hilbish/compare/v2.3.0...v2.3.1
|
|
||||||
[2.3.0]: https://github.com/Rosettea/Hilbish/compare/v2.2.3...v2.3.0
|
[2.3.0]: https://github.com/Rosettea/Hilbish/compare/v2.2.3...v2.3.0
|
||||||
[2.2.3]: https://github.com/Rosettea/Hilbish/compare/v2.2.2...v2.2.3
|
[2.2.3]: https://github.com/Rosettea/Hilbish/compare/v2.2.2...v2.2.3
|
||||||
[2.2.2]: https://github.com/Rosettea/Hilbish/compare/v2.2.1...v2.2.2
|
[2.2.2]: https://github.com/Rosettea/Hilbish/compare/v2.2.1...v2.2.2
|
||||||
|
|
|
@ -110,12 +110,11 @@ func (f *fs) fcd(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
||||||
}
|
}
|
||||||
path = util.ExpandHome(strings.TrimSpace(path))
|
path = util.ExpandHome(strings.TrimSpace(path))
|
||||||
|
|
||||||
abspath, _ := filepath.Abs(path)
|
|
||||||
err = os.Chdir(path)
|
err = os.Chdir(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
interp.Dir(abspath)(f.runner)
|
interp.Dir(path)(f.runner)
|
||||||
|
|
||||||
return c.Next(), err
|
return c.Next(), err
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ commander.register('cd', function (args, sinks)
|
||||||
dirs.setOld(hilbish.cwd())
|
dirs.setOld(hilbish.cwd())
|
||||||
dirs.push(path)
|
dirs.push(path)
|
||||||
|
|
||||||
local ok, err = pcall(function() fs.cd(path) end)
|
local ok, err = pcall(function() fs.cd(fs.abs(path)) end)
|
||||||
if not ok then
|
if not ok then
|
||||||
sinks.out:writeln(err)
|
sinks.out:writeln(err)
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -2,9 +2,8 @@ local bait = require 'bait'
|
||||||
local lunacolors = require 'lunacolors'
|
local lunacolors = require 'lunacolors'
|
||||||
|
|
||||||
hilbish.motd = [[
|
hilbish.motd = [[
|
||||||
Wait ... {magenta}2.3{reset} is basically the same as {red}2.2?{reset}
|
Finally at {red}v2.2!{reset} So much {green}documentation improvements{reset}
|
||||||
Erm.. {blue}Ctrl-C works for Commanders,{reset} {cyan}and the sh runner has some fixes.{reset}
|
and 1 single fix for Windows! {blue}.. and a feature they can't use.{reset}
|
||||||
Just trust me bro, this is an imporant bug fix release. {red}- 🌺 sammyette{reset}
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
bait.catch('hilbish.init', function()
|
bait.catch('hilbish.init', function()
|
||||||
|
|
|
@ -1,35 +1,34 @@
|
||||||
local bait = require 'bait'
|
local bait = require 'bait'
|
||||||
local lunacolors = require 'lunacolors'
|
local lunacolors = require 'lunacolors'
|
||||||
|
|
||||||
local postamble = [[
|
PREAMBLE = [[
|
||||||
{yellow}These tips can be disabled with {reset}{invert} hilbish.opts.tips = false {reset}
|
Getting Started: https://rosettea.github.io/Hilbish/docs/getting-started/
|
||||||
|
{yellow}🛈 These tips can be disabled with hilbish.opts.tips = false{reset}
|
||||||
]]
|
]]
|
||||||
|
|
||||||
hilbish.tips = {
|
hilbish.tips = {
|
||||||
'Join the discord and say hi! {blue}https://discord.gg/3PDdcQz{reset}',
|
"Join the discord and say hi! -> https://discord.gg/3PDdcQz",
|
||||||
'{green}hilbish.alias{reset} interface manages shell aliases. See more detail by running {blue}doc api hilbish.alias.',
|
"{green}hilbish.alias{reset} -> Sets an alias to another cmd",
|
||||||
'{green}hilbish.appendPath(\'path\'){reset} -> Appends the provided dir to the command path ($PATH)',
|
"{green}hilbish.appendPath{reset} -> Appends the provided dir to the command path ($PATH)",
|
||||||
'{green}hilbish.completions{reset} -> Used to control suggestions when tab completing.',
|
"{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.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.
|
{green}hilbish.opts{reset} -> Simple toggle or value options a user can set.
|
||||||
You may disable the startup greeting by {invert}hilbish.opts.greeting = false{reset}
|
- 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 to
|
{green}hilbish.runner{reset} -> The runner interface contains functions that allow the user to change how Hilbish interprets interactive input.
|
||||||
manage how Hilbish interprets interactive input. The default runners can run
|
- The default runners can run shell script and Lua code.
|
||||||
shell script and Lua code!
|
]],
|
||||||
]],
|
[[
|
||||||
[[
|
Add Lua-written commands with the commander module!
|
||||||
Add Lua-written commands with the commander module!
|
Checkout the docs here -> https://rosettea.github.io/Hilbish/docs/api/commander/
|
||||||
Check the command {blue}doc api commander{reset} or the web docs:
|
]]
|
||||||
https://rosettea.github.io/Hilbish/docs/api/commander/
|
|
||||||
]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bait.catch('hilbish.init', function()
|
bait.catch('hilbish.init', function()
|
||||||
if hilbish.interactive and hilbish.opts.tips then
|
if hilbish.interactive and hilbish.opts.tips then
|
||||||
local idx = math.random(1, #hilbish.tips)
|
local idx = math.random(1, #hilbish.tips)
|
||||||
print(lunacolors.format('{yellow}🛈 Tip:{reset} ' .. hilbish.tips[idx] .. '\n' .. postamble))
|
print(lunacolors.format(PREAMBLE .. "\nTip: " .. hilbish.tips[idx]))
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue