Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spaceship CLI repeatedly adds sections #1360

Open
Wxh16144 opened this issue Jun 7, 2023 · 1 comment
Open

spaceship CLI repeatedly adds sections #1360

Wxh16144 opened this issue Jun 7, 2023 · 1 comment
Labels
bug Bug related to code base, behavior, displaying, etc.

Comments

@Wxh16144
Copy link

Wxh16144 commented Jun 7, 2023

The problem

I have tried to customize a plugin according to the documentation.
and I want it to always work in my configuration, I used the
spaceship CLI, and it works fine, but it doesn't seem to be de-duplicated, and every time I reload zsh, it is repeatedly added.

Here's a video demo (I don't speak good English, so I'm using a translator for feedback)

Kapture.2023-06-07.at.21.41.09.mp4

Relevant Zsh configuration

No response

What is version of Spaceship are you using?

v4.14.0-1-g8461d88

What is version of Zsh are you using?

5.9

What operation system are you running?

macOS 13.3.1

Do you use any Zsh framework or plugin manager?

Oh My Zsh

Which terminal emulator do you use?

iTerm.app

Additional information

No response

@Wxh16144 Wxh16144 added the bug Bug related to code base, behavior, displaying, etc. label Jun 7, 2023
@Wxh16144
Copy link
Author

Wxh16144 commented Jun 7, 2023

My temporary solution

~/.spaceshiprc.zsh:

# spaceship add commit_hash --before git
prompt_order="$SPACESHIP_PROMPT_ORDER"

if [[ $prompt_order != *commit_hash* ]]; then
  spaceship add commit_hash --after git
fi

# react
if [[ $prompt_order != *react* ]]; then
  spaceship add react --after package
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug related to code base, behavior, displaying, etc.
Development

No branches or pull requests

1 participant