Initial editor beforce load rc.elv

Now we can define bind in rc.elv
This commit is contained in:
Shengjing Zhu 2016-02-10 03:15:47 +08:00
parent 431e5b5fd7
commit b526a592f3

11
main.go
View File

@ -90,6 +90,12 @@ func rescue() {
// TODO(xiaq): Currently only the editor deals with signals.
func interact() {
ev, st := newEvalerAndStore()
sigch := make(chan os.Signal, sigchSize)
signal.Notify(sigch)
ed := edit.NewEditor(os.Stdin, sigch, ev, st)
datadir, err := store.EnsureDataDir()
printError(err)
if err == nil {
@ -113,11 +119,6 @@ func interact() {
}
rpromptStr := username + "@" + hostname
sigch := make(chan os.Signal, sigchSize)
signal.Notify(sigch)
ed := edit.NewEditor(os.Stdin, sigch, ev, st)
for {
cmdNum++
// name := fmt.Sprintf("<tty %d>", cmdNum)