z icon indicating copy to clipboard operation
z copied to clipboard

Calls to z only show the resulting directory path but don't cd into it

Open flesler opened this issue 8 years ago • 4 comments

Platform: Raspbian Jessie (Raspberry PI 3)

flesler avatar May 07 '17 18:05 flesler

don't have an rpi handy but I imagine that the busybox or dash or whatever shell it uses doesn't support some of the bash-isms that have snuck into this project

rupa avatar May 24 '17 21:05 rupa

Could not reproduce with Raspbian x86 on a VM.

But I suspect this has to do with the line

if [ "$echo" ]; then echo "$cd"; else builtin cd "$cd"; fi

and maybe the "$echo" variable being defined in your shell.

Can you try making these changes and checking if they solve the problem?

e) local echo=echo;; to e) local _z_echo=1;; and if [ "$echo" ]; then echo "$cd"; else builtin cd "$cd"; fi to if [ "$_z_echo" ]; then echo "$cd"; else builtin cd "$cd"; fi

ericbn avatar Oct 30 '17 12:10 ericbn

@ericbn that fixed it! cc @rupa

flesler avatar Oct 30 '17 13:10 flesler

I was hitting this issue on Ubuntu 18.04, bash=4.4.19(1)-release, and the above fix worked, thanks!

jpwgarrison avatar Apr 20 '18 00:04 jpwgarrison