-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-tooling.fish
More file actions
38 lines (33 loc) · 1.1 KB
/
check-tooling.fish
File metadata and controls
38 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env fish
set cmds_not_outputting_names fzf pipx rng xsv
function check_and_print_version -a command
which $command &> /dev/null
if test $status -eq 0
# Get version string
if test $command = "eza"
set cmd_version ($command --version | awk 'NR==1 {name=$1} NR==2 {version=$1} END {print name, version}')
else
set cmd_version ($command --version | head -n 1)
if contains $command $cmds_not_outputting_names
set cmd_version "$command $cmd_version"
end
end
set_color --bold green
echo "[✔] $cmd_version"
else
set_color --bold red
echo "[✗] $command"
end
set_color normal
end
set_color --bold yellow
echo "General purpose:"
for command in ack ast-grep bat btm dust eza fd fzf hexyl htop jq mlr ncdu ouch rg rng sad sd sk tldr watchexec xsv yazi yq
check_and_print_version $command
end
echo
set_color --bold yellow
echo "Development:"
for command in bench black cargo delta difft emacs git grex just pipx python ruff uv
check_and_print_version $command
end