spaceship-prompt: Command slow in repository
Current behavior
- cd to
<repository_path> - try to run
git status3x times - When I finish type, it just show the first command result
- Cause in some repository only (Don’t know, why)
I validate that the main problem should cause by this theme, since I try to change the new ones, git status will return as expected.
Expected behavior
- git status shouldn’t take that long time.
Relevant Zsh configuration (.zshrc)
# Your configuration here
p_url="https://github.com/denysdovhan/spaceship-prompt.git"
spaceship_location="${HOME}/.zgen/sorin-ionescu/prezto-master/modules/prompt/external/spaceship"
if ! is_folder_exist "$spaceship_location"; then
git clone "$spaceship_url" "$spaceship_location" &>/dev/null
ln -s "${spaceship_location}/spaceship.zsh-theme" ~/.zprezto/modules/prompt/functions/prompt_spaceship_setup
fi
if is_file_exist "${spaceship_location}/spaceship.zsh-theme"; then
prompt spaceship
fi
SPACESHIP_PROMPT_ORDER=(
time
user
host
package
node
ruby
xcode
swift
golang
php
docker
aws
conda
line_sep
dir
git
exec_time
line_sep
battery
exit_code
char
)
SPACESHIP_RPROMPT_ORDER=(
jobs
)
SPACESHIP_PROMPT_FIRST_PREFIX_SHOW=true
SPACESHIP_TIME_SHOW=true
SPACESHIP_TIME_FORMAT="%D{%d-%m-%Y %H.%M.%S}"
SPACESHIP_BATTERY_SHOW=always
SPACESHIP_EXIT_CODE_SHOW=true
SPACESHIP_EXEC_TIME_SHOW=true
SPACESHIP_EXEC_TIME_ELAPSED=1
you can get fully .zshrc at https://github.com/kamontat/myzs
Environment
Spaceship version: 3.5.0 (use echo $SPACESHIP_VERSION)
Zsh version: zsh 5.5.1 (x86_64-apple-darwin17.5.0)
Zsh framework: prezto
Zsh plugin manager: zgen
Terminal emulator: iTerm2
Operating system: macOS High Sierra 10.13.6
Screenshot
Provide a screenshot that shows your issue. This is Video upload in Google drive
Possible solution
I think, It start slow when I instal NVM but not sure.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 20 (11 by maintainers)
I really enjoy spaceship prompt, but recently do some linux kernel tinkering. It’s not usable at all. Try to clone https://github.com/torvalds/linux/ then navigate the folders inside. Getting the prompt back after a single
lstakes more than 20 seconds, sadly.Personally I use my own fork with async implementation, but it seems #697 will be the approach that eventually gets merged, so maybe try that one and use the opportunity to provide feedback if something doesn’t work as expected 😉
Try to use any of the available async implementations of spaceship, async makes all the difference in the world 😉
This will be mostly resolved with v4.0. Please follow the related issue #491
Please post the details (and debugging info) in that PR, in this particular case I’d let the author of that PR investigate and fix these issues first 😉 But happy that async fixes the performance issue for you!
@ecbrodie Maybe you might change version manager to asdf. I didn’t use NVM for a long time because it so slow even we use lazyload.
Any update?