-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrckk
50 lines (39 loc) · 586 Bytes
/
bashrckk
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
#!/usr/bin/bash
#
# The kk system needs only 1 file: kkcmd
export KKDIR=${KKDIR:-$HOME/.kkdir}
# cd to an entry
kk() {
t1=`kkcmd -c $1`
echo "cd $t1"
cd $t1
}
# assign an entry
kka() {
kkcmd $*
}
kkl() {
kkcmd -l $*
}
# delete an entry
kkd() {
kkcmd -d $1
}
# assign shell variables
kkv() {
kkcmd -v $*
. $KKDIR/temp_k2
}
# unset shell variables. Not implemented yet.
kku() {
kkcmd -u $*
. $KKDIR/temp_k2
}
# list grep entries
kkg() {
if [ $# -ge 1 ]; then
grep -i --color=always $1 $KKDIR/temp_k
fi
}
# edit entries
alias kke="vi $KKDIR/temp_k"