Closed davidem closed 1 year ago
Hi David,
Great catch. Since I have an explicit call to bash, it seems dependent on which version of bash is symlinked. I think I missed this error because my system defaults to a newer bash package from brew. Replacing bash
in that line with /bin/bash
proves your point, as that is the native package in macOS.
I tried to use the native /bin/zsh
for this line, but it seems to break the read cmd. For the time being I will just resolve it to 1, until I find a better solution that accommodates decimals for snappier screen updates. Thanks again for catching this.
When I start
am np
I get the following error:bash: line 0: read: .5: invalid timeout specification
It appears zsh (at least the version i'm running can't handle decimal numbers. If I change the following line
input=$(bash -c "read -n 1 -t .5 input; echo \$input | xargs")
toinput=$(bash -c "read -n 1 -t 1 input; echo \$input | xargs")
the error disappears.macOS 12.6.1 and zsh 5.8.1 (x86_64-apple-darwin21.0)