medev21
medev21

Reputation: 3041

oh-my-zsh spaceship them error - no such file or directory

I have installed oh-my-zsh along with spaceship theme in the past but recently I change the username folder in mac users which affected the theme.

When I open iterm, the theme is not there and I get this error:

/Users/someuser/.oh-my-zsh/oh-my-zsh.sh:source:118: no such file or directory: /Users/someuser/.oh-my-zsh/themes/spaceship.zsh-theme

I went into .zshrc, to change the the export ZSH=.., but it's still not fixing the problem.

It's complaining it can find the spaceship theme but it looks like theme is in another folder, /Users/someuser/.oh-my-zsh/custom/theme.

Not sure, how to let oh-my-zsh know to look in the custom folder. Has anyone encountered this issue? your help will be appreciated

Upvotes: 5

Views: 15953

Answers (2)

Simba
Simba

Reputation: 27728

According to the installation guide from spaceship-prompt. Spaceship-prompt is cloned, and symlinked into oh-my-zsh's custom theme folder.

Clone this repo:

git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"

Symlink spaceship.zsh-theme to your oh-my-zsh custom themes directory:

ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Set ZSH_THEME="spaceship" in your .zshrc.

The symlink was created with an absolute path. Once your username folder is changed, the symlink is broken.

Re-doing the symlink again is enough to fix it.

ln -sf "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

Upvotes: 12

medev21
medev21

Reputation: 3041

So far the only fix to this issue was removing spaceship-them from custom folder and reinstalling it again.

Upvotes: 1

Related Questions