magicmonty / magicmonty/bash-git-prompt
_LAST_COMMAND_INDICATOR_ not replaced when not in a git repo
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 6.9k
- Forks
- 983
- Avg merge
- 13d 22h
- Merged PRs (30d)
- 2
Description
XFCE drop-down terminal, Fedora 39: this is literally what I see when not under Git repository folder:
_LAST_COMMAND_INDICATOR_ ~serhii@dell:~
08:44 $ $
I'm using GIT_PROMPT_ONLY_IN_REPO=1. When it's set to 0 the problem disappears but this is hardly a satisfying solution because I'd like Git bash prompt not to interfere when it's not under any git repo.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the prompt outside a Git repository with GIT_PROMPT_ONLY_IN_REPO=1 and compare it with the behavior when the variable is 0. Trace the prompt expansion that leaves LAST_COMMAND_INDICATOR visible, then verify that the indicator is omitted or replaced correctly outside repositories without changing the expected Git prompt behavior inside one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100