mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
opt some
This commit is contained in:
parent
6ccffa64bc
commit
2d3adedc57
@ -33,7 +33,7 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
SH: {Name: "sh path auto", Help: "命令", Actions: ice.MergeActions(ice.Actions{
|
||||
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if arg[0] == mdb.FOREACH && (arg[1] == "" || arg[1] == ssh.SHELL) {
|
||||
if arg[0] == mdb.FOREACH && arg[1] == ssh.SHELL {
|
||||
m.Cmd(nfs.CAT, "/etc/shells", func(text string) {
|
||||
kit.If(text != "" && !strings.HasPrefix(text, "#"), func() { m.PushSearch(mdb.TYPE, ssh.SHELL, mdb.NAME, path.Base(text), mdb.TEXT, path.Base(text)) })
|
||||
})
|
||||
|
@ -154,7 +154,7 @@ func init() {
|
||||
_tmux_cmd(m, SELECT_PANE, "-t", _tmux_key(m.Option(SESSION), m.Option(WINDOW), m.Option(PANE)))
|
||||
}
|
||||
}},
|
||||
code.XTERM: {Help: "切入", Hand: func(m *ice.Message, arg ...string) {
|
||||
code.XTERM: {Help: "终端", Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.Option(WINDOW) == "" {
|
||||
ctx.ProcessField(m, web.CODE_XTERM, []string{"tmux attach -t " + m.Option(SESSION)}, arg...)
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ func Render(m *Message, cmd string, args ...Any) string {
|
||||
}
|
||||
kit.For(kit.Split(k), func(k string) { list = append(list, kit.Format(`<input type="button" name="%s" value="%s">`, k, k)) })
|
||||
case Map:
|
||||
kit.For(k, func(k string) { list = append(list, kit.Format(`<input type="button" name="%s" value="%s">`, k, k)) })
|
||||
kit.For(k, func(k, v string) { list = append(list, kit.Format(`<input type="button" name="%s" value="%s">`, k, v)) })
|
||||
default:
|
||||
list = append(list, Render(m, RENDER_BUTTON, kit.LowerCapital(kit.Format(k))))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user