blob: fcc1e9c37558e7ede2138ec34d6f6f88b0283ec3 (
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
|
#!/bin/zsh
function colo {
# Change colors for current session
$HOME/bin/recolor.sh < ~/.Xresources/$1
# Load Xresources file for future sessions
xrdb ~/.Xresources/$1
# Change environment variable
export COLORSCHEME=$1
# Change default environment variable for future sessions
sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/.zsh/tmp
}
fshow() {
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \
--bind 'ctrl-m:execute:
echo {} | grep -o "[a-f0-9]\{7\}" |
xargs -I % sh -c "git show --color=always % | less -R"'
}
|