mirror of https://github.com/Hilbis/Hilbish
Compare commits
3 Commits
9165e0bdf9
...
3babf36c43
Author | SHA1 | Date |
---|---|---|
TorchedSammy | 3babf36c43 | |
TorchedSammy | b7478c3c1a | |
TorchedSammy | 605574f262 |
|
@ -5,7 +5,7 @@ local ansikit = require 'ansikit'
|
|||
|
||||
local function doPrompt(fail, mode)
|
||||
hilbish.prompt(lunacolors.format(
|
||||
'{blue}%u {cyan}%d\n' .. (fail and '{red}' or '{green}') .. '∆ '
|
||||
'{blue}%u {cyan}%d ' .. (fail and '{red}' or '{green}') .. '∆ '
|
||||
))
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# 🎀 Changelog
|
||||
|
||||
## [1.0.2] - 2021-03-06
|
||||
### Fixed
|
||||
- Cases where Hilbish's history directory doesn't exist will no longer cause a panic
|
||||
|
||||
## [1.0.1] - 2021-03-06
|
||||
### Fixed
|
||||
- Using `hilbish.appendPath` will no longer result in string spam (debugging thing left being)
|
||||
|
@ -378,6 +382,7 @@ This input for example will prompt for more input to complete:
|
|||
|
||||
First "stable" release of Hilbish.
|
||||
|
||||
[1.0.2]: https://github.com/Rosettea/Hilbish/compare/v1.0.1...v1.0.2
|
||||
[1.0.1]: https://github.com/Rosettea/Hilbish/compare/v1.0.0...v1.0.1
|
||||
[1.0.0]: https://github.com/Rosettea/Hilbish/compare/v0.7.1...v1.0.0
|
||||
[0.7.1]: https://github.com/Rosettea/Hilbish/compare/v0.7.0...v0.7.1
|
||||
|
|
9
main.go
9
main.go
|
@ -55,12 +55,12 @@ func main() {
|
|||
defaultConfPath = filepath.Join(confDir, "hilbish", "init.lua")
|
||||
} else {
|
||||
// else do ~ substitution
|
||||
defaultConfPath = filepath.Join(strings.Replace(defaultConfDir, "~", homedir, 1), "init.lua")
|
||||
defaultConfPath = filepath.Join(expandHome(defaultHistDir), "init.lua")
|
||||
}
|
||||
if defaultHistDir == "" {
|
||||
defaultHistPath = filepath.Join(userDataDir, "hilbish", ".hilbish-history")
|
||||
} else {
|
||||
defaultHistPath = filepath.Join(strings.Replace(defaultHistDir, "~", homedir, 1), ".hilbish-history")
|
||||
defaultHistPath = filepath.Join(expandHome(defaultHistDir), ".hilbish-history")
|
||||
}
|
||||
helpflag := getopt.BoolLong("help", 'h', "Prints Hilbish flags")
|
||||
verflag := getopt.BoolLong("version", 'v', "Prints Hilbish version")
|
||||
|
@ -263,3 +263,8 @@ func handleHistory(cmd string) {
|
|||
// TODO: load history again (history shared between sessions like this ye)
|
||||
}
|
||||
|
||||
func expandHome(path string) string {
|
||||
homedir := curuser.HomeDir
|
||||
|
||||
return strings.Replace(defaultHistDir, "~", homedir, 1)
|
||||
}
|
||||
|
|
2
vars.go
2
vars.go
|
@ -2,7 +2,7 @@ package main
|
|||
|
||||
// String vars that are free to be changed at compile time
|
||||
var (
|
||||
version = "v1.0.1"
|
||||
version = "v1.0.2"
|
||||
defaultConfDir = "" // ~ will be substituted for home, path for user's default config
|
||||
defaultHistDir = ""
|
||||
commonRequirePaths = "';./libs/?/init.lua;./?/init.lua;./?/?.lua'"
|
||||
|
|
Loading…
Reference in New Issue