13 Commits

Author SHA1 Message Date
Anund
168dd31367 documentation: consistent format for actions help 2025-01-23 15:58:33 -08:00
XiaoYan Li
a9c1a5c73c Add back quotes for variables in the zsh shell integration to improve compatibility
https://github.com/ghostty-org/ghostty/pull/3332#issuecomment-2564526118
According to this comment, using variables without quoting may not work with `setopt SH_WORD_SPLIT`.

We don't need to quote variables in `[[ ]]` because it works differently.
2024-12-30 11:24:39 +08:00
XiaoYan Li
a295c5e884 Fix zsh shell integration docs
- There is no need to quote variables in zsh.
- The shell integration file is not executable; we should `source` it instead.
2024-12-27 15:56:14 +08:00
Jon Parise
a0ce70651a bash: re-enable automatic bash shell detection
Bash shell detection was originally disabled in #1823 due to problems
with /bin/bash on macOS.

Apple distributes their own patched version of Bash 3.2 on macOS that
disables the POSIX-style $ENV-based startup path:

e5397a7e74/bash-3.2/shell.c (L1112-L1114)

This means we're unable to perform our automatic shell integration
sequence in this specific environment. Standard Bash 3.2 works fine.

Knowing this, we can re-enable bash shell detection by default unless
we're running "/bin/bash" on Darwin. We can safely assume that's the
unsupported Bash executable because /bin is non-writable on modern macOS
installations due to System Integrity Protection.

macOS users can either manually source our shell integration script
(which otherwise works fine with Apple's Bash) or install a standard
version of Bash from Homebrew or elsewhere.
2024-12-14 17:31:28 -05:00
Borys Lykah
2d26965f39 Fix style warning 2024-12-12 16:54:01 -07:00
Borys Lykah
69e2537438 Preserve ZSH options in the shell integration 2024-12-12 12:56:21 -07:00
Jon Parise
7d7fa46b0c shell-integration: bash must be explicitly enabled
For now, bash integration must be explicitly enabled (by setting
`shell-integration = bash`). Our automatic shell integration requires
bash version 4 or later, and systems like macOS continue to ship bash
version 3 by default. This approach avoids the cost of performing a
runtime version check.
2024-06-03 20:34:29 -04:00
Mitchell Hashimoto
982e4c9570 prettier 2024-05-27 16:16:43 -07:00
ilk
1fa830cc73 feat(shell-integration): add automatic integration for Elvish
Fish automatic integration taken as an example.
Just like fish, Elvish checks `XDG_DATA_DIRS` for its modules.
Thus, Fish integration in zig is reused, and integration in
Elvish now removes `GHOSTTY_FISH_XDG_DIR` environment variable
on launch.
2024-05-27 16:15:01 -07:00
Mitchell Hashimoto
17e7ff1de3 shell-integration: add README about Elvish 2024-05-27 16:11:08 -07:00
Jon Parise
d5414d50ea shell-integration: update Bash integration details 2024-05-14 15:06:05 -07:00
Mitchell Hashimoto
a058bcbdb0 shell-integration: add bash script (no auto-inject yet) 2023-08-17 13:26:06 -07:00
Mitchell Hashimoto
848943770a start shell-integration folder, copy into zig-out 2023-07-06 13:26:28 -07:00