Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
89 lines (68 loc) · 1.55 KB
/
Copy pathjustfile
File metadata and controls
89 lines (68 loc) · 1.55 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
set allow-duplicate-recipes
_default: check (just "valgrind=1" "test" "-v")
staged-c := `git diff --cached --name-only -- "*.[c|h]" | tr "\n" " "`
release := "0"
valgrind := "0"
mode := (
if release == "1" { "release" }
else if valgrind == "1" { "valgrind" }
else { "debug" }
)
verbose := "0"
verbose_flag := if verbose == "1" { "-v" } else { "" }
force := "0"
rebuild_flag := if force == "1" { "--rebuild" } else { "" }
cat_command := (`
if command -v bat >/dev/null 2>&1; then
echo bat
elif command -v batcat >/dev/null 2>&1; then
echo batcat
else
echo cat
fi
`)
tree_command := (`
if command -v eza >/dev/null 2>&1; then
echo "eza --tree --color always --icons always"
else
echo tree
fi
`)
tree_git_ignore_flag := (`
if command -v eza >/dev/null 2>&1; then
echo "--git-ignore"
else
echo "--gitignore"
fi
`)
[group("info")]
tree-gitignore *args: (tree tree_git_ignore_flag args)
alias t := tree-gitignore
[group("info")]
tree *args:
{{tree_command}} {{args}}
[group("info")]
tokei *args:
tokei {{args}}
[group("just")]
choose *args: (just "--choose" args)
alias c := choose
[group("just")]
list *args: (just "--list" args)
alias l := list
[group("just")]
[private]
just *args:
just {{args}}
[group("cat")]
[private]
cat *args:
{{cat_command}} {{args}}
[group("setup")]
setup: gen-just
[group("setup")]
[script]
gen-just:
scripts/gen-just.sh
import? "just/xmake.just"
import? "just/git.just"