Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

z and OS X 10.10.3 don't play nicely together #153

Open
dlo opened this issue Apr 17, 2015 · 9 comments
Open

z and OS X 10.10.3 don't play nicely together #153

dlo opened this issue Apr 17, 2015 · 9 comments

Comments

@dlo
Copy link

dlo commented Apr 17, 2015

Switching to a new directory which z has seen before in OS X 10.10.3 causes the terminal to freeze. The command that causes the issue is of the form:

awk -v path DIRECTORY -v now UNIX_TIMESTAMP

I'm not sure if the awk version changed, or what, but whenever I cd to a new directory, my shell dies. The culprit is on line 55 of z.sh.

@x3ro
Copy link

x3ro commented Jul 2, 2015

A workaround would be to install gnu-awk with homebrew (brew install gawk). The awk that comes w/ OS X seems to be from 2007 😦

@rupa
Copy link
Owner

rupa commented Jul 2, 2015

I'd like to help, but I can't reproduce, and I have the same setup:

∃rupa∈wernstrom~$ sw_vers
 ProductName:   Mac OS X
 ProductVersion:    10.10.3
 BuildVersion:  14D136
∃rupa∈wernstrom~$ awk --version
 awk version 20070501

The problem must lie elsewhere. Any ideas?

@ntdaley
Copy link

ntdaley commented Oct 25, 2015

I'm seeing something similar. Installing gnu awk did not seem to help.

sw_vers
ProductName: Mac OS X
ProductVersion: 10.11
BuildVersion: 15A284

awk --version
GNU Awk 4.1.3, API: 1.1

/usr/bin/awk --version
awk version 20070501

@ntdaley
Copy link

ntdaley commented Oct 25, 2015

What I observe is that it becomes very slow to show the prompt after each command.

I did have several folders from a network share in my ~/.z file. Is it possible that there is something that is trying to look at the status/content of those folders? This could make it slow depending on the number of such folders in the ~/.z file and the speed of the network connection.

@ntdaley
Copy link

ntdaley commented Oct 25, 2015

I also have a few folders in my ~/.z file whose name starts with a dash '-'. Could this be confusing something in _z? I know I often end up have to take special steps to stop shell commands from misinterpreting them.

@ntdaley
Copy link

ntdaley commented Oct 25, 2015

Doing some experiments with a traffic shaping tool, it seemed to happen when the current directory is on a network mounted drive.

I know, no surprise. But, OS X's Terminal.app's inspector shows the awk command mentioned by the OP as running during that time.

That said, I'm pretty sure it has happened to me when the current directory wasn't on a network share.

@Tylerc230
Copy link

FWIW I was seeing some slowdown with z and 10.11.3 and installing gawk from homebrew and setting my path to export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH" did the trick. Not sure why simply setting my path to export PATH="/usr/local/bin/:$PATH" wouldn't pick up the newly installed awk.

@kespindler
Copy link

brew install gawk got z to work for me on OS X 10.11.5.

@grepsuzette
Copy link

I identified the exact same line "awk -v -path=...." as seeming to block my system but this time on ArchLinux. Or at least, awk is using something that blocks the IO. /usr/bin/awk points to /usr/bin/gawk. I also did suspect some network shares and investigate.

Otherwise I will try and disable the autocompletion to see if things get better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants