mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-21 04:53:24 +00:00
feat: use lua to retrieve readline history
This commit is contained in:
parent
25c1d2ee2f
commit
9c91e6ee51
2
main.go
2
main.go
@ -116,8 +116,8 @@ func main() {
|
||||
}
|
||||
|
||||
go handleSignals()
|
||||
luaInit()
|
||||
lr = newLineReader("", false)
|
||||
luaInit()
|
||||
// If user's config doesn't exixt,
|
||||
if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath {
|
||||
// Read default from current directory
|
||||
|
2
rl.go
2
rl.go
@ -28,7 +28,7 @@ func newLineReader(prompt string, noHist bool) *lineReader {
|
||||
// but it cant have shared history
|
||||
if !noHist {
|
||||
lr.fileHist = newFileHistory(defaultHistPath)
|
||||
rl.SetHistoryCtrlR("History", lr.fileHist)
|
||||
rl.SetHistoryCtrlR("History", &luaHistory{})
|
||||
rl.HistoryAutoWrite = false
|
||||
}
|
||||
rl.ShowVimMode = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user