fix(tui): sort custom commands lower

This commit is contained in:
adamdotdevin 2025-08-25 11:32:15 -05:00
parent 6357136ca5
commit 836c2060c7
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75

View file

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