Pure: Couldn't read file containing theme pure

Created on 28 Nov 2017  路  9Comments  路  Source: sindresorhus/pure

General information

  • Pure version: latest from Git
  • ZSH version: 5.2.0
  • Terminal program & version: Hyper 2.1.1
  • Operating system: Ubuntu 17.10
  • ZSH framework: oh-my-zsh

Problem description

When attempting to use zsh after adding autoload -U promptinit; promptinit prompt pure, OMZ complains that it can't read file containing theme pure.

Reproduction steps

  1. Dowload git repo for Pure
  2. symlink pure.zsh and async.zsh as per integration guidelines
  3. Remove oh-my-zsh theme selection string
  4. Attempt . ~/.zshrc or to run a new zsh instance

My .zshrc:

ZSH_THEME=""
...
plugins = (
  git zsh-syntax-higlighting
)

source $ZSH/oh-my-zsh.sh

autoload -U promptinit; promptinit
prompt pure

Most helpful comment

Ah, this is neither from Pure or OMZ, it's zsh (specifically prompt). This looks like a bad symlink, what does this say?

readlink /usr/local/share/zsh/site-functions/prompt_pure_setup

You can try to fix it with:

unlink /usr/local/share/zsh/site-functions/prompt_pure_setup
ln -s /full/path/to/pure/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup

All 9 comments

I have the same issue, I installed Ubuntu Bash on Windows and so I was setting everything up and encountered this error.

Judging from your report it sounds like you're doing everything right. The weird part is that OMZ is giving you an error, OMZ should not be touching any themes when ZSH_THEME="" has been set.

Could you give more details on where you symlinked pure and async? For example: if you put them under OMZ/themes, try removing them from there and placing them in another folder under your $fpath.

The files were symlinked to /usr/local/share/zsh/site-functions and named according to the README

Ok, that's good. But I can't reproduce this with OMZ, there is some variable not accounted for here.

Could you post the exact and full output (including error) you are seeing? It could also be something else in your .zshrc so seeing the entire contents (excluding comments) might help.

A slight amendment, it's pure complaining, not OMZ.

Here's the error:
error

Here's my ~/.zshrc

  export ZSH=/home/josh/.oh-my-zsh
ZSH_THEME=""

plugins=(
  git zsh-syntax-highlighting
)

source $ZSH/oh-my-zsh.sh

autoload -U promptinit; promptinit
prompt pure

export LANG=en_GB.UTF-8

export PATH=/usr/local/cuda/bin:$PATH
export PATH=~/Downloads/flutter/bin:$PATH
export PATH=~/Downloads/swift-4.0.2-RELEASE-ubuntu16.10/usr/bin:$PATH
export PATH=~/Android/Sdk/platform-tools:$PATH

export SDKMAN_DIR="/home/josh/.sdkman"
[[ -s "/home/josh/.sdkman/bin/sdkman-init.sh" ]] && source "/home/josh/.sdkman/bin/sdkman-init.sh"

Ah, this is neither from Pure or OMZ, it's zsh (specifically prompt). This looks like a bad symlink, what does this say?

readlink /usr/local/share/zsh/site-functions/prompt_pure_setup

You can try to fix it with:

unlink /usr/local/share/zsh/site-functions/prompt_pure_setup
ln -s /full/path/to/pure/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup

Ah yes that got it, thanks.

It didn't like the use of ~ instead of /home/josh it seems.

Thanks for your help

Hello @mafredri I tried to unlink and use the full path but still my prompt_pure_setup returns

Couldn't read file /home/menardo/.zfunctions/prompt_pure_setup containing theme pure.

@meymeynard It looks like you are trying to do a user-specific installation. Do you have a directory added to your $fpath at the end of your .zshrc?
```

.zshenv or .zshrc

fpath=( "$HOME/.zfunctions" $fpath )
```

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ELLIOTTCABLE picture ELLIOTTCABLE  路  11Comments

sbmueller picture sbmueller  路  11Comments

Rawnly picture Rawnly  路  9Comments

harukizaemon picture harukizaemon  路  10Comments

d3lm picture d3lm  路  3Comments