-
Notifications
You must be signed in to change notification settings - Fork 2
/
sheet.sh
executable file
·56 lines (43 loc) · 1.45 KB
/
sheet.sh
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
#!/bin/bash
# Include include
. $(dirname "$0")/src/include.sh
include_once 'src/colors/colorize_output.sh' 'src/colors/colors.sh' 'src/colors/prompt.sh'
include_once 'src/list/list.sh' 'src/list/iteration.sh' 'src/list/choice.sh'
include_once 'src/aliases.sh' 'src/thumbnail.sh' 'src/run_as_root.sh'
# echo "Reache dhere"
# NOTE: for the work of this application, we can list an element eligible IFF:
# 1. The entry is a directory.
# 2. The entry directory has a file called "theme.txt". This will work as our
# main theme.
compfunc='
compfunc() {
# echo "Reached here"
# echo $ENTRY
if [ -d "$ENTRY" ] && [ -n "$(find "$ENTRY" -maxdepth 1 -type f -name "theme.txt" -print -quit)" ]; then
return 0
else
# echo "Readhed here"
return 1
fi
}
'
# export COMMUNISM="comrade"
# echo $COMMUNISM
# run_as_root
# echo "$compfunc"
# list_if --help
list_if create "$compfunc"
DIRECTORIES="${RETURN_VALUE[@]}"
echo "Directory: ${DIRECTORIES[0]}"
# echo "${#RETURN_VALUE[@]} ${RETURN_VALUE[@]}"
# iterate 'a' 1 2 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
iterate '1' ${RETURN_VALUE[@]}
choiceRange "Choose your option" ${RETURN_VALUE[@]}
get_index $((RETURN_VALUE-1)) ${DIRECTORIES[@]}
# print_thumbnail
# choiceRange --help
# choiceYN
# choiceRange 1 10
# prompt -s "Your choice is: $RETURN_VALUE\n"
# choiceCustom "Do you bing chill" Y N "fuck you"
# echo "Your choice is: $RETURN_VALUE"