# which replacement when missing
cmd-exists which \
  || which() {
    IFS=:
    DIR
    [ "$#" -gt 0 ] \
      && for DIR in ${PATH}; do
        ls -1 "${DIR}/$1" 2>/dev/null && return 0
      done
    return 1
  }
