Spaceship-prompt: Issues with git module when path contains spaces

Created on 22 Jan 2018  路  5Comments  路  Source: denysdovhan/spaceship-prompt

Issue

The git module seems to have issues when the Path contains spaces. An error message expr: syntax error or expr: not a decimal number: /part/of/thepath' is printed at the end of every output.

It must be git module related as it only occurs in folders that are part of a git repository.

To reproduce:
cd /tmp; mkdir Some\ Path\ with\ spaces; git init;

Screenshot

Provide a screenshot that shows your issue

screenshot

Environment

Spaceship version: 3.0.2
Zsh version: zsh 5.4.2 (x86_64-apple-darwin16.7.0)
Zsh framework: oh-my-zsh
Zsh plugin manager: None
Terminal emulator: iTerm2
Operating system: macOS 10.13.2

Relevant .zshrc

# your configuration here
bug has-pr

Most helpful comment

Found the culprit in dir section, used to truncate repository path while in git repositories.

https://github.com/denysdovhan/spaceship-prompt/blob/c33a02c1dce57025128f94d1eaa4a4965362c65b/sections/dir.zsh#L29

As _temporary workaround_ , set SPACESHIP_DIR_TRUNC_REPO=false in your .zshrc.

All 5 comments

Able to reproduce, We'll look into it. Thank you for the report.

Found the culprit in dir section, used to truncate repository path while in git repositories.

https://github.com/denysdovhan/spaceship-prompt/blob/c33a02c1dce57025128f94d1eaa4a4965362c65b/sections/dir.zsh#L29

As _temporary workaround_ , set SPACESHIP_DIR_TRUNC_REPO=false in your .zshrc.

Wow, this was very fast, thank you! It works!

Happy to see it resolved. Behavior of SPACESHIP_DIR_TRUNC_REPO is modified with #281 and this issue will be resolved.

worked perfect for me to! Tks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JounQin picture JounQin  路  3Comments

ChadTaljaardt picture ChadTaljaardt  路  4Comments

oldchevy picture oldchevy  路  3Comments

nfischer picture nfischer  路  3Comments

tbekaert picture tbekaert  路  3Comments