diff options
| author | Michelle Tilley <michelle@michelletilley.net> | 2026-03-24 09:43:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-24 09:43:12 -0700 |
| commit | c6e0f847d62aafdbf091e57ec601f4d47dc24512 (patch) | |
| tree | 2660ffe15f072ee940a5160fa25e607bec7da5f6 /crates/atuin-hex | |
| parent | docs: fix duplicated word in Kubernetes guide (#3338) (diff) | |
| download | atuin-c6e0f847d62aafdbf091e57ec601f4d47dc24512.zip | |
fix: Atuin Hex fails to init on bash and zsh (#3341)
Fixes #3340
Diffstat (limited to 'crates/atuin-hex')
| -rw-r--r-- | crates/atuin-hex/src/lib.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/atuin-hex/src/lib.rs b/crates/atuin-hex/src/lib.rs index feed6e36..0bfe54d8 100644 --- a/crates/atuin-hex/src/lib.rs +++ b/crates/atuin-hex/src/lib.rs @@ -95,10 +95,10 @@ fn render_init(shell: Shell) -> &'static str { match shell { Shell::Bash | Shell::Zsh => { r#"if [[ "$-" == *i* ]] && [[ -t 0 ]] && [[ -t 1 ]]; then - _atuin_hex_tmux_current="${{TMUX:-}}" - _atuin_hex_tmux_previous="${{ATUIN_HEX_TMUX:-}}" + _atuin_hex_tmux_current="${TMUX:-}" + _atuin_hex_tmux_previous="${ATUIN_HEX_TMUX:-}" - if [[ -z "${{ATUIN_HEX_ACTIVE:-}}" ]] || [[ "$_atuin_hex_tmux_current" != "$_atuin_hex_tmux_previous" ]]; then + if [[ -z "${ATUIN_HEX_ACTIVE:-}" ]] || [[ "$_atuin_hex_tmux_current" != "$_atuin_hex_tmux_previous" ]]; then export ATUIN_HEX_ACTIVE=1 export ATUIN_HEX_TMUX="$_atuin_hex_tmux_current" exec atuin hex @@ -451,6 +451,12 @@ mod tests { } #[test] + fn posix_init_has_no_double_braces() { + let script = render_init(Shell::Bash); + assert!(!script.contains("${{"), "double braces in bash init script"); + } + + #[test] fn fish_init_uses_source() { let script = render_init(Shell::Fish); assert!(script.contains("exec atuin hex")); |
