pure: Cannot add pure to prompt themes, connected to MB M1?
General information
I’m using the pure theme now for two years without any issues. Yesterday I switched to a new MacBook Air M1 and now I’m having some issues. I cannot set the prompt to pure with prompt pure.
System report (output of prompt_pure_system_report):
zsh: command not found: prompt_pure_system_report
Other information
I have:
- Tested with another terminal program and can reproduce the issue: iTerm
- Followed the integration instructions for my framework
Problem description
When I try to add the theme with prompt pure:
Result:
Usage: prompt <options>
Options:
-c Show currently selected theme and parameters
-l List currently available prompt themes
-p [<themes>] Preview given themes (defaults to all)
-h [<theme>] Display help (for given theme)
-s <theme> Set and save theme
<theme> Switch to new theme immediately (changes not saved)
Use prompt -h <theme> for help on specific themes.
When I show the list of available themes with prompt -l, pure is not in this list.
I have installed it, like the years before, with npm install --global pure-prompt.
I’m not sure what the problem is. Could it be connected to the M1 MacBook?
Reproduction steps
- MacBook Air M1
- Install pure through npm global
- Try to set the theme with the code below from my
.zshrcfile.
My .zshrc:
# Activate Oh-My-Zsh
source $ZSH/oh-my-zsh.sh
# Change Pure Colors
zmodload zsh/nearcolor
zstyle :prompt:pure:git:branch color green
# Activate Pure Theme
# Make sure to remove this if you use another theme
autoload -U promptinit; promptinit
prompt pure
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 29
- Comments: 31
Links to this issue
Commits related to this issue
- fix: pure prompt workaround for Apple silicon See https://github.com/sindresorhus/pure/issues/584 — committed to chriseverson/dotfiles by chriseverson 3 years ago
- fix: pure prompt workaround for Apple silicon See https://github.com/sindresorhus/pure/issues/584 — committed to chriseverson/dotfiles by chriseverson 3 years ago
- Try more paths during install, like `/opt/homebrew` on Mac M1 On M1 Macs, the Homebrew path has changed to `/opt/homebrew` so we check at which path zsh is present. Additionally we try to install in... — committed to sindresorhus/pure by mafredri 3 years ago
- Install Pure Prompt manually I was having issues (along with others [1]) getting Pure Prompt to work correctly on an M1 Mac when I installed it with NPM or Homebrew. Installing manually (though a lit... — committed to conradbeach/dotfiles by conradbeach 3 years ago
- Fix pure prompt installation not working on M1 MacBook Install through Homebrew instead See https://github.com/sindresorhus/pure/issues/584 — committed to kallgren/dotfiles by kallgren 8 months ago
Thank you @diogotorres97, however you missed the “s” in your answer:
Now Pure (installed with Homebrew) is working on my MacBook Air M1 with macOS Monterey.
Thanks!! This works perfectly!
I’ve gotten so used to pure I can’t handle the standard prompt…
same problem
Same problem here, on MacBook Air M1.
I added
fpath+=/opt/homebrew/share/zsh/site-functionsto the.zshrc(installed via homebrew)I also tried the manual way, like described:
Unfortunately, pure theme still not in the prompt list.
Ok I take the last message, back. Setting it up manually, worked after
autoload -U promptinit; promptinit. So it seems the issue is only connected to the global prompt npm package in my case.Just installed Pure via Homebrew on an M1 iMac and I’m having the same issue. I can work around it, but it would nice if Pure could be updated to handle the new Homebrew paths.
Oh you are right, on my other laptop the path is still
usr/local/homwbrew. Thanks for the hint.The path changed on M1 laptops: https://www.reddit.com/r/MacOS/comments/jw9guu/why_did_homebrew_move_from_usrlocalto_opthomebrew/
Do you think this is something your package could check on install?
I’d also like to point out that another option is to change the Homebrew provided Zsh, FWIW.
Could someone with an M1 Mac test #606 to see if it works? You can clone the repo and then run
npm run postinstallinside it (notice that it should create symlinks in/opt/homebrew/share/zsh/site-functions, so don’t let that mess up your setup).@adamgruber that’s expected when you haven’t installed (or aren’t using) ZSH from Homebrew. We don’t have write permissions to that path. The manual add of fpath is the fix.