mirror of
https://github.com/sst/opencode.git
synced 2025-08-28 17:04:10 +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 {
|
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))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue