mirror of
https://github.com/sst/opencode.git
synced 2025-08-28 08:54:06 +00:00
fix(tui): sort custom commands lower
This commit is contained in:
parent
6357136ca5
commit
836c2060c7
1 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue