summaryrefslogtreecommitdiff
path: root/src/os/open.zig
AgeCommit message (Collapse)Author
2025-07-06Fallback to cross-platform minimal open when apprt is not availableMitchell Hashimoto
2025-07-06core/gtk: open urls using an apprt action instead of doing it directlyJeffrey C. Ollie
Partial implementation of #5256 This implements the core changes necessary to open urls using an apprt action rather than doing it directly from the core. Implements the open_url action in the GTK and GLFW apprts. Note that this should not be merged until a macOS-savvy developer can add an implementation of the open_url action for the macOS apprt.
2025-06-24fix: always wait on open command to avoid defunct processesPeter Bui
To avoid blocking on waiting for the child process, perform the wait in a detached thread.
2025-06-21Add FreeBSD support-k
Following https://github.com/cryptocode/ghostty/commit/7aeadb06ee5c38c440ac86b975d713a8ccfa3e0b
2025-03-12Lots of 0.14 changesMitchell Hashimoto
2024-12-30os: don't return stack memoryMitchell Hashimoto
A regression from adcaff7137ef
2024-12-30config: edit opens AppSupport over XDG on macOS, prefers non-empty pathsMitchell Hashimoto
Fixes #3953 Fixes #3284 This fixes two issues. In fixing one issue, the other became apparent so I fixed both in this one commit. The first issue is that on macOS, the `open` command should take the `-t` flag to open text files in a text editor. To do this, the `os.open` function now takes a type hint that is used to better do the right thing. Second, the order of the paths that we attempt to open when editing a config on macOS is wrong. Our priority when loading configs is well documented: https://ghostty.org/docs/config#macos-specific-path-(macos-only). But open_config does the opposite. This makes it too easy for people to have configs that are being overridden without them realizing it. This commit changes the order of the paths to match the documented order. If neither path exists, we prefer AppSupport.
2024-05-31os/open: do not wait for commands which do not terminateGregory Anders
Some opener commands (like macOS's open) finish immediately after running, while others (xdg-open) do not, staying alive until the application that was opened itself terminates. For now, we explicitly state whether or not we should wait for a command. Eventually we may want to do something more generic (e.g. wait for some predetermined amount of time and if the process does not complete, give up without collecting stderr).
2024-05-20os: some stylistic changes, comments for stderr loggingMitchell Hashimoto
2024-05-19os: log stderr from open commandGregory Anders
2024-01-13build: build produces a broken object file for iOSMitchell Hashimoto
This gets `zig build -Dtarget=aarch64-ios` working. By "working" I mean it produces an object file without compiler errors. However, the object file certainly isn't useful since it uses a number of features that will not work in the iOS sandbox. This is just an experiment more than anything to see how hard it would be to get libghostty working within iOS to render a terminal. Note iOS doesn't support ptys so this wouldn't be a true on-device terminal. The challenge right now is to just get a terminal rendering (not usable).
2023-11-29os: openMitchell Hashimoto