Files
comma-scripts/,
lixulun 38a7b74872 refactor: use error function for missing tool detection
- Add `error` helper to print red-colored error messages
- Replace hardcoded "not found" strings with `error` calls
- Add checks for uv, pipx, nodejs, pnpm, and mise
2026-03-26 10:40:59 +08:00

28 lines
796 B
Bash
Executable File

#!/bin/bash
set -e
echo "This is a \"comma script\", meaning a script starts with a comma."
echo "The benefit is: type \",\" and press TAB, and you can see all comma scripts!"
echo ""
echo "Shell:" $(echo $SHELL)
echo "PATH:" $(echo "$PATH" | tr ':' '\n' | wc -l) "paths [Please run ',path' to view path list]"
echo ""
error() {
echo -e "\033[31m$1\033[0m"
}
echo "Ruby:" $(command -v ruby || error "not found")
echo "Python:" $(command -v python || error "not found")
echo "uv:" $(command -v uv || error "not found")
echo "pipx:" $(command -v pipx || error "not found")
echo "nodejs:": $(command -v node || error "not found")
echo "pnpm:" $(command -v pnpm || error "not found")
echo "mise:" $(command -v mise || error "not found")
echo "llm:" $(command -v llm || error "not found")