Skip to content

zsh: fix regression in spack env activate --prompt#51258

Merged
tgamblin merged 1 commit intodevelopfrom
hs/fix/spack-env-activate-prompt-zsh
Sep 1, 2025
Merged

zsh: fix regression in spack env activate --prompt#51258
tgamblin merged 1 commit intodevelopfrom
hs/fix/spack-env-activate-prompt-zsh

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Sep 1, 2025

The spack.llnl.util.tty.color._escape function started to output the
literal characters \ and e instead of the escape character.

That leads to:

\e[0;0;92m[default]\e[0;0m √ spack %

instead of

[default] √ spack %

on macOS's default shell.

(I wonder how this went unnoticed since it regressed in April 2024 🤔 #43712)

The spack.llnl.util.tty.color._escape function started to output the
literal characters `\` and `e` instead of the escape character.

That leads to:

```
\e[0;0;92m[default]\e[0;0m √ spack %
```

instead of

```
[default] √ spack %
```

on macOS's default zsh.

Signed-off-by: Harmen Stoppels <[email protected]>
@haampie haampie requested a review from tgamblin September 1, 2025 14:27
@tgamblin tgamblin added the v1.0.2 PRs / Bug fixes to backport for v1.0.2 label Sep 1, 2025
@tgamblin tgamblin merged commit ef6ff44 into develop Sep 1, 2025
33 checks passed
@tgamblin tgamblin deleted the hs/fix/spack-env-activate-prompt-zsh branch September 1, 2025 23:30
@alalazo alalazo mentioned this pull request Sep 3, 2025
26 tasks
alalazo pushed a commit that referenced this pull request Sep 8, 2025
The spack.llnl.util.tty.color._escape function started to output the
literal characters `\` and `e` instead of the escape character.

That leads to:

```
\e[0;0;92m[default]\e[0;0m √ spack %
```

instead of

```
[default] √ spack %
```

on macOS's default zsh.

Signed-off-by: Harmen Stoppels <[email protected]>
haampie added a commit that referenced this pull request Sep 12, 2025
The spack.llnl.util.tty.color._escape function started to output the
literal characters `\` and `e` instead of the escape character.

That leads to:

```
\e[0;0;92m[default]\e[0;0m √ spack %
```

instead of

```
[default] √ spack %
```

on macOS's default zsh.

Signed-off-by: Harmen Stoppels <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1.0.2 PRs / Bug fixes to backport for v1.0.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants