pew-org/pew

Running an init bash script on pew workon ...

portedison opened this issue · 3 comments

To be fair this isn't an 'issue', but wasn't sure where to ask this.

Is there a way to run a bash script every time I run pew workon ... I need to run nvm use to match the node version, and that seems the most logical place to run it.

Which operating system and shell are you using?

Mac

On Catalina 10.15.2, I was able to do it by pasting the desired commands in .bashrc in my user home (~/) folder.
(The Terminal app in Catalina uses .bash_profile for startup commands, while pew uses .bashrc.)

Does that work for you?

(Edit: Actually, I guess that's a terrible solution if you use that .bashrc for anything other than pew.)

There's also an init.bash file in the library folder where pew is installed, but I wasn't able to edit that to get the desired effect.