diff --git a/init/bash.in b/init/bash.in index 919d793d3..aa38f46bc 100644 --- a/init/bash.in +++ b/init/bash.in @@ -25,8 +25,8 @@ fi __build_FPATH_for_zsh_ksh() { - (compinit -C 2> /dev/null) - if [ "$?" != 0 ]; then + + if ! (compinit -C 2> /dev/null) ; then __zsh_fpath=$(unset FPATH; zsh -f -c 'echo $FPATH') fi @@ -39,8 +39,7 @@ if [ -n "${ZSH_VERSION+x}" ]; then fi if [ -n "${KSH_VERSION+x}" -o -n "${BASH_VERSION+x}" ]; then - type zsh > /dev/null 2>&1 - if [ "$?" = 0 ]; then + if command -v zsh > /dev/null; then __build_FPATH_for_zsh_ksh else export FPATH=$(@PKGV@/libexec/addto --append FPATH ${FPATH:-} @PKGV@/init/ksh_funcs)