-
Notifications
You must be signed in to change notification settings - Fork 1
/
mmgg.bash
46 lines (40 loc) · 951 Bytes
/
mmgg.bash
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
#export MMGG_CONF_DIR = "~/.config/mmgg"
function mm() {
USAGE="Usage: mm [bookmark tag]" ;
if [ ! -d ~/.config/mmgg ] ; then
echo "Making config directory"
mkdir -p ~/.config/mmgg
fi
if [ $# -eq 0 ] ; then
# number of arguments is zero
echo "cd `pwd`" > ~/.config/mmgg/m;
else
case $1 in
-h)
echo "$USAGE";
;;
*)
echo "cd `pwd`" > ~/.config/mmgg/"$1";
;;
esac
fi
}
function gg() {
USAGE="Usage: gg [bookmark tag]" ;
if [ ! -d ~/.config/mmgg ] ; then
echo "You have no bookmarks"
fi
if [ $# -eq 0 ] ; then
# number of arguments is zero
source ~/.config/mmgg/m;
else
case $1 in
-h)
echo "$USAGE";
;;
*)
source ~/.config/mmgg/"$1";
;;
esac
fi
}