rupa / z

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

_z:8: _Z_OWNER: parameter not set #255

Open chrissound opened 5 years ago

chrissound commented 5 years ago

I sometimes run into this error when running a script source example.sh from the CLI.

In turn it seems to hang my terminal, and if i CTRL-C I seem to lose some prompt context:

_z:8: _Z_OWNER: parameter not set                                                                                                                                                     
prompt_context:1: DEFAULT_USER: parameter not set
chrissound commented 5 years ago

Probably because my script I'm calling has:

set -euo pipefail
set -o xtrace
ghost commented 5 years ago

You don't want to use set -u with z, since it sometimes does stuff with nonset variables. I guess z could execute set +u before doing said operations and then reset it back to the user's preferred state after finishing?