macos: filter only supported commands in the command palette

This got accidentally regressed when we did the jump options.
This commit is contained in:
Mitchell Hashimoto
2026-01-27 08:17:20 -08:00
parent 66e8b47fc3
commit 0de5f43254

View File

@@ -120,14 +120,16 @@ struct TerminalCommandPaletteView: View {
/// Custom commands from the command-palette-entry configuration.
private var terminalOptions: [CommandOption] {
guard let appDelegate = NSApp.delegate as? AppDelegate else { return [] }
return appDelegate.ghostty.config.commandPaletteEntries.map { c in
CommandOption(
title: c.title,
description: c.description
) {
onAction(c.action)
return appDelegate.ghostty.config.commandPaletteEntries
.filter(\.isSupported)
.map { c in
CommandOption(
title: c.title,
description: c.description
) {
onAction(c.action)
}
}
}
}
/// Commands for jumping to other terminal surfaces.