fzf mappings
This commit is contained in:
parent
e28af63738
commit
d37073a391
@ -30,4 +30,11 @@ done
|
|||||||
export TMPDIR
|
export TMPDIR
|
||||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"
|
||||||
|
|
||||||
export FZF_DEFAULT_OPTS="--layout=default"
|
export FZF_DEFAULT_OPTS="\
|
||||||
|
--bind \
|
||||||
|
ctrl-/:toggle-preview,\
|
||||||
|
ctrl-a:toggle-all,\
|
||||||
|
ctrl-p:preview-up,\
|
||||||
|
ctrl-n:preview-down,\
|
||||||
|
ctrl-u:clear-query \
|
||||||
|
"
|
||||||
@ -44,7 +44,7 @@
|
|||||||
submodule = short
|
submodule = short
|
||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
a = "!git ls-files --exclude-standard -m --others -t | fzf -m --bind ctrl-a:toggle-all --bind load:last --preview 'echo {} | cut -d\" \" -f2 | xargs git diff --color=always' | cut -d' ' -f2 | xargs git add"
|
a = "!git ls-files --exclude-standard -m --others -t | fzf -m --bind load:last --preview 'git diff --color=always {2}' | cut -d' ' -f2 | xargs git add"
|
||||||
d = diff
|
d = diff
|
||||||
di = diff
|
di = diff
|
||||||
ds = diff --staged
|
ds = diff --staged
|
||||||
@ -63,7 +63,7 @@
|
|||||||
hsa = hist -n 10 --all
|
hsa = hist -n 10 --all
|
||||||
last = log -1 HEAD
|
last = log -1 HEAD
|
||||||
today = hist --since=midnight
|
today = hist --since=midnight
|
||||||
df = "!git log --pretty=format:'%h %cd [%cn] %s%d' --date=relative | fzf --preview='echo {} | cut -d \" \" -f1 | xargs -I _ git diff --color=always _^ _'"
|
df = "!git log --pretty=format:'%h %cd [%cn] %s%d' --date=relative | fzf --preview='git diff --color=always {1}^ {1}'"
|
||||||
type = cat-file -t
|
type = cat-file -t
|
||||||
dump = cat-file -p
|
dump = cat-file -p
|
||||||
unstage = "reset HEAD --"
|
unstage = "reset HEAD --"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user