From 9f78a9903c4750ab36379bcde4140c1f2359f303 Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 2 Aug 2018 21:45:52 +0800 Subject: [PATCH] add some --- etc/init.shy | 5 +++-- src/contexts/ctx.go | 2 +- src/contexts/nfs/nfs.go | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/etc/init.shy b/etc/init.shy index 7ce4c7bd..13b38d43 100644 --- a/etc/init.shy +++ b/etc/init.shy @@ -1,7 +1,8 @@ -~shell1 - login root root source etc/local.shy + ~file1 history load etc/history.txt + ~shell1 alias import nfs + alias send pwd diff --git a/src/contexts/ctx.go b/src/contexts/ctx.go index 3678be1a..137f255d 100644 --- a/src/contexts/ctx.go +++ b/src/contexts/ctx.go @@ -2453,7 +2453,7 @@ var Index = &Context{Name: "ctx", Help: "模块中心", list := []string{} j := 0 for i := 1; i < len(arg); i++ { - if arg[i] == "_" && j < len(args) { + if arg[i] == "_" && m.Assert(j < len(args)) { list = append(list, args[j]) j++ continue diff --git a/src/contexts/nfs/nfs.go b/src/contexts/nfs/nfs.go index dc5dce44..adb31ba3 100644 --- a/src/contexts/nfs/nfs.go +++ b/src/contexts/nfs/nfs.go @@ -493,6 +493,7 @@ func (nfs *NFS) Read(p []byte) (n int, err error) { // {{{ } case termbox.KeyCtrlI: + break if len(tab) == 0 { tabi = 0 prefix := string(buf)