1
0
forked from x/ContextOS

tce add nfs.git

This commit is contained in:
shaoying 2018-05-15 20:42:00 +08:00
parent 90d9e44530
commit 4d422f8efb
2 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,6 @@
login root root login root root
~ssh ~ssh
config domain ctx config domain tce
dial "shylinux.com:9090" dial "shylinux.com:9090"

View File

@ -11,6 +11,7 @@ import ( // {{{
"io" "io"
"net/url" "net/url"
"os" "os"
"os/exec"
"strconv" "strconv"
"strings" "strings"
"unicode" "unicode"
@ -946,6 +947,15 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心",
m.Assert(e) m.Assert(e)
m.Echo(wd) // }}} m.Echo(wd) // }}}
}}, }},
"git": &ctx.Command{Name: "git", Help: "写入文件, string: 写入内容, pos: 写入位置", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
cmd := exec.Command("git", arg...)
if out, e := cmd.CombinedOutput(); e != nil {
m.Echo("error: ")
m.Echo("%s\n", e)
} else {
m.Echo(string(out))
}
}},
}, },
Index: map[string]*ctx.Context{ Index: map[string]*ctx.Context{
"void": &ctx.Context{Name: "void", "void": &ctx.Context{Name: "void",