summaryrefslogtreecommitdiff
path: root/src/input/command.zig
AgeCommit message (Collapse)Author
2025-10-03Zig 0.15: zig build test Mitchell Hashimoto
2025-09-23config: smarter parsing in autoParseStructJeffrey C. Ollie
Fixes #8849 Previously, the `parseAutoStruct` function that was used to parse generic structs for the config simply split the input value on commas without taking into account quoting or escapes. This led to problems because it was impossible to include a comma in the value of config entries that were parsed by `parseAutoStruct`. This is particularly problematic because `ghostty +show-config --default` would produce output like the following: ``` command-palette-entry = title:Focus Split: Next,description:Focus the next split, if any.,action:goto_split:next ``` Because the `description` contains a comma, Ghostty is unable to parse this correctly. The value would be split into four parts: ``` title:Focus Split: Next description:Focus the next split if any. action:goto_split:next ``` Instead of three parts: ``` title:Focus Split: Next description:Focus the next split, if any. action:goto_split:next ``` Because `parseAutoStruct` simply looked for commas to split on, no amount of quoting or escaping would allow that to be parsed correctly. This is fixed by (1) introducing a parser that will split the input to `parseAutoStruct` into fields while taking into account quotes and escaping. And (2) changing the `ghostty +show-config` output to put the values in `command-palette-entry` into quotes so that Ghostty can parse it's own output. `parseAutoStruct` will also now parse double quoted values as a Zig string literal. This makes it easier to embed control codes, whitespace, and commas in values.
2025-08-26gtk-ng: implement close_tab:other keybindJeffrey C. Ollie
2025-08-25parameterize close_tabJeffrey C. Ollie
- Add mode (`this`/`other`) parameter to `close_tab` keybind/apprt action. - Keybinds will default to `this` if not specified, eliminating backward compatibility issues (`keybind=x=close_tab` === `keybind=x=close_tab:this`). - Remove `close_other_tabs` keybind and apprt action.
2025-08-24Close other tabs feature on Mac.jamylak
Supporting command line, file menu and keybindings. Default mac shortcut of `super + alt + o` (other) Not able to test on Linux so excluding `close_other_tabs` from `gtk` for now make a default short cut for close other tabs
2025-08-14gtk-ng: add show_on_screen_keyboard bindingLeah Amelia Chen
2025-07-06keybind: rename copy_title to copy_title_to_clipboardJeffrey C. Ollie
Co-authored-by: Jon Parise <jon@indelible.org>
2025-07-06keybind: add copy_title actionJeffrey C. Ollie
Fixes #7829 This will copy the terminal title to the clipboard. If the terminal title is not set it has no effect.
2025-07-06keybind: add set_font_sizeJeffrey C. Ollie
Fixes #7795 This allows the font size to be set to an absolute value.
2025-06-29Introduce action for copying into clipboardTroels Thomsen
2025-06-25config: add `command-palette-entry` config optionLeah Amelia Chen
2025-06-07add undo/redo keybindings, default them on macOSMitchell Hashimoto
2025-06-05input: add focus split directional commands to command paletteMitchell Hashimoto
2025-06-04core: document keybind actions betterLeah Amelia Chen
The current documentation for actions are very sparse and would leave someone (even including contributors) as to what exactly they do. On top of that there are many stylistic and grammatical problems that are simply no longer in line with our current standards, and certainly not on par with our configuration options reference. Hence, I've taken it upon myself to add, clarify, supplement, edit and even rewrite the documentation for most of these actions, in a wider effort of trying to offer better, clearer documentation for our users.
2025-05-29GTK: add action to show the GTK inspectorJeffrey C. Ollie
The default keybinds for showing the GTK inspector (`ctrl+shift+i` and `ctrl+shift+d`) don't work reliably in Ghostty due to the way Ghostty handles input. You can show the GTK inspector by setting the environment variable `GTK_DEBUG` to `interactive` before starting Ghostty but that's not always convenient. This adds a keybind action that will show the GTK inspector. Due to API limitations toggling the GTK inspector using the keybind action is impractical because GTK does not provide a convenient API to determine if the GTK inspector is already showing. Thus we limit ourselves to strictly showing the GTK inspector. To close the GTK inspector the user must click the close button on the GTK inspector window. If the GTK inspector window is already visible but is hidden, calling the keybind action will not bring the GTK inspector window to the front.
2025-05-15macos: add "Check for Updates" action, menu item & key-binding supportAaron Ruan
2025-05-06Add "Scroll to Selection" commandfn ⌃ ⌥
2025-05-01Binding for toggling window float on top (macOS only)Mitchell Hashimoto
This adds a keybinding and apprt action for #7237.
2025-04-22move command filtering into apprtMitchell Hashimoto
2025-04-21order commands alphabetically and preserve capitalizationMitchell Hashimoto
2025-04-21fix CIMitchell Hashimoto
2025-04-21input: omit commands that are platform-specificMitchell Hashimoto
2025-04-21add toggle command palette bindingMitchell Hashimoto
2025-04-21input: defind Command struct and default commandsMitchell Hashimoto