rupa / z

z - jump around
Do What The F*ck You Want To Public License
16.39k stars 1.17k forks source link

Fixed the _z_precmd:1: nice(5) failed: operation not permitted error #200

Closed kerren-ortlepp closed 3 years ago

kerren-ortlepp commented 7 years ago

I've found that when I use Antigen or zgen I usually get this error when I install z:

_z_precmd:1: nice(5) failed: operation not permitted

I've fixed this error but directing that output to null. It's tested and working on Windows 10 Bash so I assume it'll work on native Linux terminal as well.

If this doesn't get accepted, people that need to fix this error can clone the fork that is located at:

https://github.com/Kerren/z

ericbn commented 7 years ago

Cannot reproduce this on Ubuntu running on Windows 1709 (Fall Creators Update). Looks like this was fixed.

mcornella commented 6 years ago

Cannot reproduce this on Ubuntu running on Windows 1709 (Fall Creators Update). Looks like this was fixed.

I can still reproduce it in 1803. You must have setopt nobgnice somewhere in your config files.

My opinion about this PR is that it's better to add that (setopt nobgnice) to your zshrc files than hacking around a temporary limitation of the WSL. This fix also has the problem of hiding any errors the z encounters, meaning there can be other errors printed to the console that this PR would hide.

👎

mcornella commented 6 years ago

As an addendum, this has been fixed in version 17738.

EDIT: confirmed fixed in build 1809.

roachsinai commented 6 years ago

Reproduce it at Microsoft Windows [version 10.0.17134.286], ——1803, and add unsetopt BG_NICE to .zshrc according to Microsoft/WSL#1887.