blob: 879804c68a3d55383601206d1bcf677d0415afc8 (
plain)
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
|
#!/usr/bin/env bash
open () {
if [ -f /usr/bin/xdg-open ]; then
nohup xdg-open "$*" > /dev/null 2>&1 &
elif [ -f /usr/bin/open ]; then
/usr/bin/open "$*"
else
echo "No usable program is found"
fi
}
greview () {
usage='usage: greview <base_branch>'
if [ $# -lt 1 ]; then
echo $usage
return
fi
base_branch=$1
# vim -p $(git diff --merge-base --name-only $base_branch) \
# "+tabdo Gvdiff $base_branch" \
# "+nmap <C-j> :tabnext<CR>" \
# "+nmap <C-k> :tabpreivous<CR>"
vim $(git diff --merge-base --name-only $base_branch) \
"+nmap <leader>gd :Gvdiffsplit $base_branch<CR>"
}
|