Particle CLI with Zsh instead of Bash

I’m a Mac user who recently upgraded to Catalina. I’d like to know if it’s possible to install and use Particle CLI in Z shell instead of switching between zsh and bash. And if not, are there any plans for this in the future?

Thanks

Install the Particle CLI in bash, then:

Add this to ~/.zprofile. You can also copy and paste it from ~/.profile:


# set PATH so it includes user's private bin if it exists                             

if [ -d "$HOME/bin" ] ; then

    PATH="$HOME/bin:$PATH"

fi

2 Likes

Worked perfectly – thanks @rickkas7

I’m using oh-my-zsh and should have read the very first line of the .zshrc file:

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

All I needed to do was uncomment that export line to get the Particle-CLI working again.

1 Like

Any suggestions on how to make this work from within VSCode as well when you launch the Particle CLI?

The suggested fixes don’t seem to fix that problem.
Thanks!

1 Like