forked from x/icebergs
opt some
This commit is contained in:
parent
568e026913
commit
13714d65b7
@ -294,7 +294,14 @@ func (f *Frame) Start(m *ice.Message, arg ...string) bool {
|
||||
f.target = m.Source()
|
||||
break
|
||||
}
|
||||
if s, e := os.Open(arg[0]); !m.Warn(e != nil, "%s", e) {
|
||||
s, e := os.Open(arg[0])
|
||||
if os.IsNotExist(e) && strings.HasPrefix(arg[0], "usr") {
|
||||
ls := strings.Split(arg[0], "/")
|
||||
m.Cmd("web.code.git.repos", ls[1], "usr/"+ls[1])
|
||||
s, e = os.Open(arg[0])
|
||||
}
|
||||
|
||||
if !m.Warn(e != nil, "%s", e) {
|
||||
defer s.Close()
|
||||
|
||||
buf := bytes.NewBuffer(make([]byte, 0, 4096))
|
||||
|
@ -74,7 +74,7 @@ var Index = &ice.Context{Name: GIT, Help: "代码库",
|
||||
})
|
||||
}},
|
||||
|
||||
GIT: {Name: "git port=auto path=auto auto 启动:button 构建:button 下载:button", Help: "编辑器", Action: map[string]*ice.Action{
|
||||
GIT: {Name: "git port=auto path=auto auto 构建 下载", Help: "编辑器", Action: map[string]*ice.Action{
|
||||
"download": {Name: "download", Help: "下载", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(code.INSTALL, "download", m.Conf(GIT, kit.META_SOURCE))
|
||||
}},
|
||||
|
@ -52,7 +52,7 @@ var Index = &ice.Context{Name: VIM, Help: "编辑器",
|
||||
m.Cmd("web.spide_rewrite", "create", "from", "https://raw.githubusercontent.com/shylinux/contexts/master/etc/conf/plug.vim", "to", "http://localhost:9020/publish/plug.vim")
|
||||
m.Cmd("nfs.file_rewrite", "create", "from", "etc/conf/plug.vim", "to", "https://raw.githubusercontent.com/shylinux/contexts/master/etc/conf/plug.vim")
|
||||
}},
|
||||
VIM: {Name: "vim port=auto path=auto auto 启动:button 构建:button 下载:button", Help: "编辑器", Action: map[string]*ice.Action{
|
||||
VIM: {Name: "vim port=auto path=auto auto 构建 下载", Help: "编辑器", Action: map[string]*ice.Action{
|
||||
"download": {Name: "download", Help: "下载", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(code.INSTALL, "download", m.Conf(VIM, kit.META_SOURCE))
|
||||
}},
|
||||
|
@ -72,7 +72,7 @@ var Index = &ice.Context{Name: ZSH, Help: "命令行",
|
||||
}},
|
||||
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Cmd("web.spide_rewrite", "create", "from", "https://sourceforge.net/projects/zsh/files/zsh/5.8/zsh-5.8.tar.xz", "to", "http://localhost:9020/publish/zsh-5.8.tar.gz")
|
||||
// m.Cmd("web.spide_rewrite", "create", "from", "https://sourceforge.net/projects/zsh/files/zsh/5.8/zsh-5.8.tar.xz", "to", "http://localhost:9020/publish/zsh-5.8.tar.gz")
|
||||
|
||||
m.Conf(web.FAVOR, "meta.render.shell", m.AddCmd(&ice.Command{Name: "render type name text", Help: "渲染引擎", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
value, _ := m.Optionv(kit.MDB_VALUE).(map[string]interface{})
|
||||
|
Loading…
x
Reference in New Issue
Block a user