@@ -92,12 +92,12 @@ func (r CommandRegistry) Sorted() []Command {
if b.Name == AppExitCommand {
return -1
}
- if a.Custom {
- return -1
- }
- if b.Custom {
+ if a.Custom && !b.Custom {
return 1
+ if !a.Custom && b.Custom {
+ return -1
+ }
return strings.Compare(string(a.Name), string(b.Name))
})