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

Current path is shown on the right #687

Open
2 tasks done
steliyan opened this issue Oct 16, 2024 · 0 comments
Open
2 tasks done

Current path is shown on the right #687

steliyan opened this issue Oct 16, 2024 · 0 comments

Comments

@steliyan
Copy link

General information

System report (output of prompt_pure_system_report):

- Operating system: macOS 15.0.1 (24A348)
- Terminal program: unknown (unknown)
- Tmux: no
- Git: git version 2.46.0
- Pure state:
    - username: `''`
    - prompt: `❯`
    - version: `1.23.0`
- zsh-async version: `1.8.6`
- PROMPT: `typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f %F{242}${prompt_pure_vcs_info[branch]}%F{218}${prompt_pure_git_dirty}%f
%}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '`
- Colors: `typeset -g -A prompt_pure_colors=( [execution_time]=yellow [git:action]=yellow [git:arrow]=cyan [git:branch]=242 [git:branch:cached]=red [git:dirty]=218 [git:stash]=cyan [host]=242 [path]=blue [prompt:continuation]=242 [prompt:error]=red [prompt:success]=magenta [suspended_jobs]=red [user]=242 [user:root]=default [virtualenv]=242 )`
- TERM: `export TERM=xterm-kitty`
- Virtualenv: `export VIRTUAL_ENV_DISABLE_PROMPT=12`
- Conda: `export CONDA_CHANGEPS1=no`
- Detected frameworks: Prezto

Other information

I am using kitty as a terminal. More interestingly I am using home-manager.

I have:

  • Tested with another terminal program and can reproduce the issue: Tested with built-in Terminal app in MacOS
  • Followed the integration instructions for my framework

Problem description

The path is shown on the right of the prompt, as well as on the left (check the attached screenshot).

image

Although, nothing is set for RPROMPT the path is shown on the right:

~d/config master*
❯ typeset -p PROMPT                                                                              ~d/config
typeset PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f %F{242}${prompt_pure_vcs_info[branch]}%F{218}${prompt_pure_git_dirty}%f\n%{\C-M%}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '

~d/config master*
❯ typeset -p RPROMPT                                                                             ~d/config

~d/config master*
❯       

Reproduction steps

Adding RPROMPT= fixes it (check the .zshrc below).

.zshrc:

# Source Prezto.
if [[ -s "/nix/store/mvfxc0f2ccpx86w7hb2l3sdazx03qh4q-zsh-prezto-0-unstable-2024-06-03/share/zsh-prezto/init.zsh" ]]; then
  source "/nix/store/mvfxc0f2ccpx86w7hb2l3sdazx03qh4q-zsh-prezto-0-unstable-2024-06-03/share/zsh-prezto/init.zsh"
fi

# Setting this to an empty string fixes it
# RPROMPT=

.zpreztorc

zstyle ':prezto:*:*' case-sensitive 'yes'
zstyle ':prezto:*:*' color 'yes'

zstyle ':prezto:load' pmodule \
  prompt

zstyle ':prezto:module:editor' key-bindings 'vi'
zstyle ':prezto:module:prompt' theme 'pure'

Although, I've fixed the issue, it kinda bothers me I need to manually reset the RPROMPT. I haven't really debugged zsh configurations before, but I am open to suggestions. :)

@steliyan steliyan changed the title Current path is shown is shown on the right Current path is shown on the right Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant