forked from x/icebergs
opt some
This commit is contained in:
parent
1fe85e82f7
commit
d8ee0e91c3
@ -183,7 +183,7 @@ func init() {
|
||||
m.Logs(mdb.SELECT, DIR_ROOT, root)
|
||||
}
|
||||
_dir_list(m, root, dir, 0, m.Option(DIR_DEEP) == ice.TRUE, kit.Select(TYPE_BOTH, m.Option(DIR_TYPE)), kit.Regexp(m.Option(DIR_REG)), fields)
|
||||
m.Sort(PATH).StatusTimeCount()
|
||||
m.StatusTimeCount()
|
||||
}},
|
||||
})
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ func ReadDir(m *ice.Message, p string) ([]os.FileInfo, error) {
|
||||
list, e := OptionFiles(m).ReadDir(p)
|
||||
for i := 0; i < len(list)-1; i++ {
|
||||
for j := i + 1; j < len(list); j++ {
|
||||
if list[i].Name() > list[j].Name() {
|
||||
if !list[i].IsDir() && list[j].IsDir() || list[i].Name() > list[j].Name() {
|
||||
list[i], list[j] = list[j], list[i]
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,9 @@ func init() {
|
||||
PLAN: {Name: "plan scale=week,day,week,month,year,long begin_time@date list", Help: "计划", Actions: ice.MergeActions(ice.Actions{
|
||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(TODO, mdb.INPUTS, arg) }},
|
||||
mdb.PLUGIN: {Name: "plugin extra.index extra.args", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(TASK, mdb.MODIFY, arg) }},
|
||||
mdb.INSERT: {Name: "insert zone type=once,step,week name text begin_time@date close_time@date", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(TASK, mdb.INSERT, arg)
|
||||
}},
|
||||
ice.RUN: {Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.RenameOption(TASK_POD, ice.POD); ctx.PodCmd(m, m.PrefixKey(), ice.RUN, arg) {
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user