Open nikitavoloboev opened 7 years ago
@nikitavoloboev I had the same issue and was able to fix it this way with a clean install:
add this to your .bash_profile
:
. ~/path/to/your/z/folder/z.sh
Clone this repo into wherever you chose to install it:
git clone https://github.com/rupa/z.git
Make the file executable:
chmod +x ~/path/to/your/z/folder/z.sh
I figured these out from this tutorial: Setting Up a Mac Dev Machine From Zero to Hero With Dotfiles
I hope this helps!
@nikitavoloboev I had the same issue and the previously mentioned fix didn't help me, but this did so I'll document it here:
My shell was sh
while it needs to be bash
for this to work. To change it:
chsh
command Shell: /bin/sh
and change it to: Shell: /bin/bash
. Save, restart the terminal.This fixed the issue.
probably some different things going on here, FWIW:
I'm also getting this syntax error with each new z shell window. :/
Curt's solution isn't working, and I don't think Jonathan's makes sense because I know that z should work in zshell.
/Users/stephennixon/devtools/z.sh: line 63: syntax error near unexpected token `<'
/Users/stephennixon/devtools/z.sh: line 63: ` awk < <(_z_dirs 2>/dev/null) -v path="$*" -v now="$(date +%s)" -F"|" ''
+1
@rupa, there's still a process substitution at https://github.com/rupa/z/blob/ea5ec7834398ee2244de26953b3d1ef785d3f942/z.sh#L137 that could affect other shells as reported here.
This may be related to shopt
. Compare the output of shopt
in a shell where this issue occurs, then run bash -i
and try again in that shell.
It outputs this line whenever I try to run something :
I tried to look at the script itself to see how I can fix this error but I couldn't find what exactly I need to change. Here is how line 60 looks for me :
awk < <(_z_dirs 2>/dev/null) -v path="$*" -v now="$(date +%s)" -F"|"
Thank you for any help.