mirror of https://github.com/Hilbis/Hilbish
feat: use lua to retrieve readline history
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…
Reference in New Issue