1
0
forked from x/ContextOS

mac mod cli.target 创建新模块时自动切换到上下文

This commit is contained in:
shaoying 2017-11-21 06:01:00 +08:00
parent 6b0d2bc998
commit 4671fd1b5d
2 changed files with 10 additions and 4 deletions

View File

@ -3,10 +3,15 @@
# login root 94ca7394d007fa189cc4be0a2625d716 root # login root 94ca7394d007fa189cc4be0a2625d716 root
login root root login root root
~cli # ~cli
remote slaver listen :9393 tcp # remote slaver listen :9393 tcp
# ~aaa # ~aaa
# login shy shy # login shy shy
userinfo add context hi hello nice # userinfo add context hi hello nice
userinfo add command hi context # userinfo add command hi context
~web
listen
# ~demo
# listen
# ~home spawn test

View File

@ -390,6 +390,7 @@ var Index = &ctx.Context{Name: "cli", Help: "管理终端",
args := m.Meta["spawn"] args := m.Meta["spawn"]
msg := m.Spawn(v) msg := m.Spawn(v)
v.Spawn(msg, args[0]).Begin(msg) v.Spawn(msg, args[0]).Begin(msg)
cli.target = msg.Target
case m.Has("switch"): case m.Has("switch"):
cli.target = v cli.target = v
case m.Has("show"): case m.Has("show"):