prompt now display contextual infos

This commit is contained in:
fatalerrors
2026-05-20 14:14:06 +02:00
parent 28e4c112af
commit d22b24e54c
14 changed files with 159 additions and 6 deletions

View File

@@ -171,6 +171,24 @@ TERM=xterm-256color
#
# Working directory
#PROMPT_COLOR_DIR_FG=$ICyan
#
# Context segment (Git branch / Conda environment) on the top bar
#PROMPT_COLOR_CTX_FG=$BIYellow
#
# Show Git branch at the end of the top bar when inside a repository.
#PROMPT_SHOW_GIT=1
#
# Include Git dirty marker and upstream drift (+ahead/-behind) in the context.
#PROMPT_SHOW_GIT_STATUS=1
#
# Show Conda environment name at the end of the top bar when active.
#PROMPT_SHOW_CONDA=1
#
# Show Python venv name when active (ignored if Conda is active).
#PROMPT_SHOW_VENV=1
#
# Show session markers (ssh, tmux, screen) when applicable.
#PROMPT_SHOW_SESSION=1
# ==============================================================================
[pwd]

View File

@@ -20,11 +20,14 @@ version-bump.
## Prompt & theming
- [ ] **Git branch in prompt** — show the current branch name (and dirty
indicator) in the PS1 bar when inside a Git repository. Should be
gated behind a `[prompt]` config key so it can be disabled. **[medium]**
- [ ] **Virtual-env / conda indicator** — detect `$VIRTUAL_ENV` / `$CONDA_DEFAULT_ENV`
and display the name in the prompt bar. **[easy]**
- [x] **Git branch in prompt** — show the current branch name (with dirty and
upstream drift indicators) in the PS1 bar when inside a Git repository,
gated by `[prompt]` config keys. **[medium]**
- [x] **Virtual-env / conda indicator** — detect `$VIRTUAL_ENV` / `$CONDA_DEFAULT_ENV`
and display the active environment in the prompt bar. **[easy]**
- [x] **Session context markers** — display lightweight session markers
(`ssh`, `tmux`, `screen`) at the end of the prompt bar, gated by
`[prompt]` config keys. **[easy]**
- [ ] **True-colour terminal auto-detection** — query `$COLORTERM` and
`$TERM` at load time; automatically fall back from a 24-bit theme to its
16-colour equivalent when the terminal does not support true colour. **[medium]**