From e28af63738319de100c5497056a3a4ea7b06f14a Mon Sep 17 00:00:00 2001 From: thek4n Date: Wed, 13 Mar 2024 11:23:22 +0300 Subject: [PATCH] git aliases --- home/user/.config/bash/export | 4 +++- home/user/.config/git/config | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/home/user/.config/bash/export b/home/user/.config/bash/export index c9850ac..a6be18f 100644 --- a/home/user/.config/bash/export +++ b/home/user/.config/bash/export @@ -28,4 +28,6 @@ do done export TMPDIR -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:" \ No newline at end of file +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:" + +export FZF_DEFAULT_OPTS="--layout=default" \ No newline at end of file diff --git a/home/user/.config/git/config b/home/user/.config/git/config index 48996fc..a338e4f 100644 --- a/home/user/.config/git/config +++ b/home/user/.config/git/config @@ -44,7 +44,7 @@ submodule = short [alias] - a = "!git ls-files --exclude-standard -m --others -t | fzf -m --bind ctrl-a:toggle-all | cut -d' ' -f2 | xargs git add" + 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" d = diff di = diff ds = diff --staged @@ -63,8 +63,7 @@ hsa = hist -n 10 --all last = log -1 HEAD today = hist --since=midnight - df = "!git log --pretty=format:'%h %cd [%cn] %s%d' --date=relative | fzf +m | awk '{print $1}' | xargs -I {} git diff {}^ {}" - fdf = "!git log --pretty=format:'%h' --date=relative | fzf --bind ctrl-/:toggle-preview --preview-window right:60% --preview=\"git diff {}^ {} --color=always\"" + df = "!git log --pretty=format:'%h %cd [%cn] %s%d' --date=relative | fzf --preview='echo {} | cut -d \" \" -f1 | xargs -I _ git diff --color=always _^ _'" type = cat-file -t dump = cat-file -p unstage = "reset HEAD --"