retitle 537283 built-in tests fail in precmd if no command was executed thanks
% precmd_test() { set -x; test -d . && echo . is a directory; set +x; } % precmd_functions=(precmd_test) +precmd_test:0> test -d . +precmd_test:0> echo . is a directory . is a directory +precmd_test:0> set +x % [PRESS CTRL-C] +precmd_test:0> test -d . precmd_test:test: argument expected +precmd_test:0> set +x The same happens with [ -d . ], but /usr/bin/test and /usr/bin/[ work fine. Thus, there must be something fundamentally out of order with precmd functions and builtin tests which shows only when precmd functions are called without a preceding exec() by the shell. Running an external programme before the test from the precmd function (e.g. ls >/dev/null) does not work though. I can reproduce this with zsh -f. -- .''`. martin f. krafft <madd...@d.o> Related projects: : :' : proud Debian developer http://debiansystem.info `. `'` http://people.debian.org/~madduck http://vcs-pkg.org `- Debian - when you have better things to do than fixing systems
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)