-
Notifications
You must be signed in to change notification settings - Fork 2
/
functions.zsh
51 lines (42 loc) · 871 Bytes
/
functions.zsh
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
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
e() {
emacsclient -c -a '' $* &
}
et() {
emacsclient -t -a '' $*
}
fname() {
find . -name "*$**"
}
update-submodules() {
git submodule foreach 'git pull origin master'
}
update-git-repos() {
cwd=$(pwd)
for dir in $(find -type d -name '.git'); do
cd ${dir}/..
git pull origin master
cd ${cwd}
done
}
tmux-rename-to-current() {
tmux renamew $(basename "$(pwd)")
}
bak() {
cp -ri $1{,.bak}
}
unbak() {
cp -ri $1{.bak,}
rm -ri $1.bak
}
for f in $(command ls $HOME/.zsh/functions); do autoload -Uz $f; done