-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcaser
More file actions
executable file
·43 lines (38 loc) · 899 Bytes
/
caser
File metadata and controls
executable file
·43 lines (38 loc) · 899 Bytes
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
#!/usr/bin/env bash
show_help() {
# or: $0 [-c COARSENESS] [-d SEPARATOR] NUMERATOR DENOMINATOR
# -c, --coarseness COARSENESS: precision. Defaults to $DEFAULT_COARSENESS.
cat << __EOF__
INCOMPLETE; Quick converter between snake_case, camelCase, PascalCase, and CONSTANT_CASE.
Usage: $0 -c TEXT
or: $0 --camel TEXT
or: $0 -s TEXT
or: $0 --snake TEXT
or: $0 -u TEXT
or: $0 --upper TEXT
or: $0 -p TEXT
or: $0 --pascal
or: $0 --help
or: $0 --version
Options:
-c, --camel: Convert to camelCase.
-s, --snake: Convert to snake_case.
-u, -p, --upper, --pascal: Convert to PascalCaseAkaUpperCamelCase.
-h, --help: Shows this help text.
-v, --version: Shows version info.
__EOF__
}
show_version() {
cat << __EOF__
$0 1.0.0
Copyright (C) 2025 Justin Morris
__EOF__
}
if [ "$1" = '--help' ]; then
show_help
exit
elif [ "$1" = '--version' ]; then
show_version
exit
fi
# if [ "$1" =~ ]