Spaceship-prompt: Unexpected characters duplication at the start on tab

Created on 4 Sep 2019  Â·  2Comments  Â·  Source: denysdovhan/spaceship-prompt

Current behavior

As shown in the picture, sometimes when tab is pressed, the shell duplicates the first two character of the command and is not possible to delete them.

I follow an issue that advice to remove non-ascii character as SPACESHIP_CHAR_SYMBOL (I used to put a lambda there), so I put "~> ", the problem seems to be solved, but it is clearly not.

Expected behavior

Not to happen

Relevant Zsh configuration (.zshrc)

# Spaceship prompt customizzation
SPACESHIP_EXEC_TIME_SHOW=true
SPACESHIP_CHAR_SYMBOL="~> "
#SPACESHIP_CHAR_SYMBOL="λ"
SPACESHIP_USER_COLOR=blue
SPACESHIP_USER_SHOW=always
SPACESHIP_HOST_SHOW=always
SPACESHIP_HOST_COLOR=green
SPACESHIP_EXIT_CODE_SHOW=true
SPACESHIP_EXIT_CODE_SYMBOL="✘ "
SPACESHIP_DIR_TRUNC=5 # all
SPACESHIP_GIT_BRANCH_COLOR=red
SPACESHIP_GIT_STATUS_COLOR=red

SPACESHIP_PROMPT_ORDER=(
  time          # Time stamps section
  user          # Username section
  host          # Hostname section
  dir           # Current directory section
  git           # Git section (git_branch + git_status)
  hg            # Mercurial section (hg_branch  + hg_status)
  package       # Package version
  node          # Node.js section
  ruby          # Ruby section
  elixir        # Elixir section
  xcode         # Xcode section
  swift         # Swift section
  golang        # Go section
  php           # PHP section
  rust          # Rust section
  haskell       # Haskell Stack section
  julia         # Julia section
  docker        # Docker section
  aws           # Amazon Web Services section
  venv          # virtualenv section
  conda         # conda virtualenv section
  pyenv         # Pyenv section
  dotnet        # .NET section
  ember         # Ember.js section
  kubecontext   # Kubectl context section
  terraform     # Terraform workspace section
  exec_time     # Execution time
  line_sep      # Line break
  battery       # Battery level and status
  vi_mode       # Vi-mode indicator
  jobs          # Background jobs indicator
  exit_code     # Exit code section
  char          # Prompt character
)

Environment

Spaceship version: 3.11.1 (use echo $SPACESHIP_VERSION)
Zsh version: zsh 5.7.1 (x86_64-pc-linux-gnu)
Zsh framework: None
Zsh plugin manager: None
Terminal emulator: Deepin Terminal
Operating system: Arch Linux

Screenshot

DeepinScreenshot_select-area_20190903130111

Possible solution
Hi found out that the issue appear only when the previous command fails, so when there is ✘ 130 ~> at the start of the line .
Seems to be fixed removing the ✘ character. There is a way to use this type of character?

Most helpful comment

I think this is an issue with zsh itself, this issue solved the problem for me by setting export LC_CTYPE=en_US.UTF-8 in my zshrc.

All 2 comments

I think this is an issue with zsh itself, this issue solved the problem for me by setting export LC_CTYPE=en_US.UTF-8 in my zshrc.

@SkonTeam thanks... this was driving me nuts and couldn't find a solution until your posted this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChadTaljaardt picture ChadTaljaardt  Â·  4Comments

AlecRust picture AlecRust  Â·  3Comments

conradwt picture conradwt  Â·  3Comments

Vvkmnn picture Vvkmnn  Â·  3Comments

olets picture olets  Â·  3Comments