change liner source so that we can have good tty config
This commit is contained in:
parent
f69532d54c
commit
91498926d5
4 changed files with 14 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ import (
|
|||
"os"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"github.com/peterh/liner"
|
||||
"github.com/candid82/liner"
|
||||
"gitlab.com/whom/shs/ast"
|
||||
"gitlab.com/whom/shs/log"
|
||||
"gitlab.com/whom/shs/util"
|
||||
|
|
@ -109,6 +109,12 @@ func main() {
|
|||
line := liner.NewLiner()
|
||||
defer line.Close()
|
||||
|
||||
if !liner.TerminalSupported() {
|
||||
log.Log(log.ERR,
|
||||
"Terminal unsupported, continuing in dummy mode!",
|
||||
"init")
|
||||
}
|
||||
|
||||
line.SetCtrlCAborts(true)
|
||||
line.SetCompleter(func(line string) (c []string) {
|
||||
return util.ShellCompleter(line, vars, funcs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue