Add titles to config file and sort list by title
This commit is contained in:
@@ -46,7 +46,7 @@ func newBashJob(schedule, sh string, title ...string) (*Job, error) {
|
||||
Raw: sh,
|
||||
Runner: Bash,
|
||||
}
|
||||
if len(title) == 0 {
|
||||
if len(title) == 0 || len(title[0]) == 0 {
|
||||
j.Title = j.Name
|
||||
} else {
|
||||
j.Title = title[0]
|
||||
|
||||
@@ -93,6 +93,7 @@ func splitScheduleCommandTitle(b []byte) (string, string, string) {
|
||||
if i := strings.LastIndex(commandTitle, "#"); i >= 0 {
|
||||
title = commandTitle[i+1:]
|
||||
}
|
||||
title = strings.TrimSpace(title)
|
||||
return schedule, commandTitle, title
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user