1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 08:48:06 +08:00

kid add pretty

This commit is contained in:
shaoying 2018-07-30 20:42:27 +08:00
parent 42ad3657e3
commit 5549683902
3 changed files with 17 additions and 4 deletions

View File

@ -2,11 +2,14 @@
BENCH=src/example/bench.go
install:
@go get github.com/go-sql-driver/mysql
@go get github.com/nsf/termbox-go
@go get github.com/skip2/go-qrcode
@cp etc/go.snippets ~/.vim/snippets/
@cp etc/shy.vim ~/.vim/syntax/
@touch etc/local.shy
go install $(BENCH)
# @md5 `which bench`
@[ `uname` = "Darwin" ] && md5 `which bench`
@date
build:

View File

@ -168,8 +168,6 @@ func (cli *CLI) Start(m *ctx.Message, arg ...string) bool { // {{{
} else {
m.Spawn().Cmd("alias", "import", "nfs")
m.Spawn().Cmd("login", "root", "root")
m.Spawn().Cmd("context", "web", "serve", "usr", ":9094")
m.Spawn().Cmd("context", "web", "right", "add", "shy", "command", "/upload", "dir", "usr")
}
}
return false

View File

@ -591,8 +591,20 @@ func (nfs *NFS) Start(m *ctx.Message, arg ...string) bool { // {{{
nfs.Cap("termbox", "true")
nfs.Conf("color", "true")
nfs.out = m.Optionv("out").(*os.File)
nfs.history = append(nfs.history, "open 'http://localhost:9094/upload'")
for _, v := range []string{
"say you are so pretty",
"context web serve ./ :9094",
// "context web right add shy command /upload dir usr",
// "open 'http://localhost:9094/'",
} {
m.Back(m.Spawn(m.Source()).Set("detail", v))
}
nfs.history = append(nfs.history, "open 'http://localhost:9094'")
m.Capi("nline", 1)
nfs.print(fmt.Sprintf("your are so pretty\n"))
nfs.print(fmt.Sprintf("your can open 'http://localhost:9094'\n"))
nfs.print(fmt.Sprintf("press C-P then C-J\n"))
}
line := ""