mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:47:51 +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.
|
// TODO(xiaq): Currently only the editor deals with signals.
|
||||||
func interact() {
|
func interact() {
|
||||||
ev, st := newEvalerAndStore()
|
ev, st := newEvalerAndStore()
|
||||||
|
|
||||||
|
sigch := make(chan os.Signal, sigchSize)
|
||||||
|
signal.Notify(sigch)
|
||||||
|
|
||||||
|
ed := edit.NewEditor(os.Stdin, sigch, ev, st)
|
||||||
|
|
||||||
datadir, err := store.EnsureDataDir()
|
datadir, err := store.EnsureDataDir()
|
||||||
printError(err)
|
printError(err)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -113,11 +119,6 @@ func interact() {
|
||||||
}
|
}
|
||||||
rpromptStr := username + "@" + hostname
|
rpromptStr := username + "@" + hostname
|
||||||
|
|
||||||
sigch := make(chan os.Signal, sigchSize)
|
|
||||||
signal.Notify(sigch)
|
|
||||||
|
|
||||||
ed := edit.NewEditor(os.Stdin, sigch, ev, st)
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
cmdNum++
|
cmdNum++
|
||||||
// name := fmt.Sprintf("<tty %d>", cmdNum)
|
// name := fmt.Sprintf("<tty %d>", cmdNum)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user