mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
Initial editor beforce load rc.elv
Now we can define bind in rc.elv
This commit is contained in:
parent
431e5b5fd7
commit
b526a592f3
11
main.go
11
main.go
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user