-
Notifications
You must be signed in to change notification settings - Fork 8
question: defining function based on alias `cd' #32
Comments
I have the script inside chpwd () {
local PKG=$PWD/package.json
if [ -f "$PKG" ] && [ "$NODENGINE_LAST_DIR" != "$PWD" ]; then
nodengine
# printf "\033[36m%s\033[0m \033[90m%s\033[0m\n" "nodengine" "$(node --version)"
NODENGINE_LAST_DIR=$PWD
fi
} |
I tried that, but it made no difference, same exact error. |
This appears to be some kind of conflict with the latest I see rvm uses the same aliasing kind of mechanism. I'm wondering if you cannot alias an alias...? |
oh man, rvm is a mistake. use n, seriously: https://www.npmjs.com/package/n |
I use n for Node, rvm for Ruby. n doesn't manage rubies. |
oh sorry, I understood I have rvm as well:
|
We are on |
I close this because is not highly related with nodengine issue, but feel free to comment |
Well, not sure what to say. It's an issue, verified on two machines with the recommended integration from the So essentially, I actually expect others to start bumping into it. |
not sure why If you execute Then is a problem related with your shell scripts |
Yes, direct execution of The shell hooks are what makes Also, these same scripts have been working for at least a year, the ones copied from the README here. So agreed, environmental change, but the scripts from here are the only things breaking with updated software. |
Finally I found it. I knew it! Error prone syntax, so this is officially a bug. Credit to ohmyzsh/ohmyzsh#6237 (comment) I'll PR the readme change that works. |
The old syntax started erroring with zsh 5.4.1. This new change is confirmed working. Note that the function used does need to be declared (it seems) before the others.
I just updated everything on OSX, zsh is now 5.4.1_1 and I'm suddenly getting:
in my .zshrc on line
I'm sure it is a local problem, but I know little about zsh scripting etc. Any thoughts?
The text was updated successfully, but these errors were encountered: