vim=$(find_working vim 2>/dev/null) [ $? = 0 ] && alias vi="$vim" unset vim