-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
73 lines (55 loc) · 1.39 KB
/
.zshrc
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
buka(){
echo -n "Enter a number: "
read VAR
if [[ "$1" == "" ]];
then
cd "/Applications/MAMP/htdocs/";
else
cd "/Applications/MAMP/htdocs/$1";
fi
if [[ $2 == "php" ]];
then phpstorm .
else
echo "-----"
fi
clear
}
# Git Shortcode
gitAll(){
git add .
if [ [ "$1" != "" ]];
then
git commit -m "$1";
else
git commit -m "update";
fi
if [[ "$2" == "" ]];
then
git push -u origin master;
else
git push -u origin "$1";
fi
}
bersihkan () {
BASEDIR=$(dirname "$0")
# read -p "All node_modules in this directory $BASEDIR will be delete ? (Y/n) :" -n 1 -r
# echo "All node_modules in this directory $BASEDIR will be delete ? (Y/n) :" -n 1 -r
echo -n "Hapus libray nodejs? (y/n) "
read NODE
echo -n "Hapus vendor dari composer? (y/n) "
read VENDOR
if [[ $NODE =~ ^[Yy]$ ]]
then
echo "node akan dihapus"
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
else
echo "node tidak di hapus"
fi
if [[ $VENDOR =~ ^[Yy]$ ]]
then
echo "vendor akan dihapus"
find . -name 'vendor' -type d -prune -print -exec rm -rf '{}' \;
else
echo "vendor tidak di hapus"
fi
}