-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleprompt
executable file
·44 lines (39 loc) · 1.08 KB
/
styleprompt
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
#!/bin/bash
# source api so styleprompt can have access to color vars and funcs
path="$(readlink -f "$(dirname "$0")")"
source $path/core/api
# Code
if [ ! -d $path/"Saved Prompts" ]; then
mkdir $path/"Saved Prompts"
fi
case $@ in
-i | --interactive | "")
echo -en "${WHITE}What do you want to do?
1. Make a new prompt (-n | --new)
2. Load a saved prompt to $HOME/.bashrc (-l | --load)
3. Revert to last prompt (-r | --revert)
4. Delete all styleprompt prompts from .bashrc (-D | --delete-all)
${LIBLUE}[ 1, 2, 3, or 4 ] "
read objective
case $objective in
1) source $path/core/newPrompt ;;
2) loadPrompt ;;
3) revert ;;
4) delete_all ;;
esac
;;
-n | --new) source $path/core/newPrompt ;;
-l | --load)
lsStartover="214"
until [ "$lsStartover" != "214" ]; do loadPrompt; done
unset lsStartover
;;
-r | --revert) revert_prompt ;;
-D | --delete-all) delete_all ;;
-h | --help | '?') print_help ;;
-v | --version) echo -e "${DARKPEACH}${version}${NC}" ;;
-p | --pick-color)
pickColor "Pick a color:" color
echo -en "${WHITE}Escape Code: ${color}"; echo "$color"
;;
esac