commit 9b7bae173d63822c230107aba4bd01ed8991d0a4
parent 1e4976097db2135b1dd9543bed38e270da60cb5a
Author: Dash Eclipse <dashezup@disroot.org>
Date: Sat, 26 Mar 2022 21:23:04 +0000
feat: update git config
* git alias: git fz
* zsh alias: diff
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/.config/git/config b/.config/git/config
@@ -67,5 +67,6 @@
# zcat repo_2022-03-22_feat-initial-commit.tar.gz | git get-tar-commit-id
arc = "!f() { test -z \"$1\" && return 1; FMT=\"$1\"; RN=\"$(basename $(git rev-parse --show-toplevel))\"; EN=\"$(git log -1 --oneline --pretty=%as_%f)\"; git archive --format=\"$FMT\" -o \"${RN}_${EN}.${FMT}\" --prefix=\"${RN}/\" HEAD; }; f"
alias = "!git config -l | grep alias | cut -c 7- | column -s'=' -t -l2 | GREP_COLORS='ms=1;32' egrep --color 'f\\(\\)|$'"
+ fz = !ALIAS=$(echo 'fzlog fzcheckout find' | tr ' ' '\n' | fzf --layout=reverse --inline-info --prompt='git ') && git $ALIAS
fzlog = !git log --oneline --pretty=xoneline --color=always | fzf --no-sort --ansi --multi --inline-info --reverse --prompt='git log ' --preview='git show {+1} --color=always' --bind='enter:execute:git show {+1} --color=always' --bind='F2:toggle-preview'
fzcheckout = "!TARGET=$({ git branch --all --color -vv | sed 's/^/branch,/'; git tag | sed 's/^/tag, /'; } | column -s, -t -l2 | fzf --ansi --no-sort --layout=reverse --info=inline --prompt='git checkout ' | awk '{print $2}') && test ! -z \"$TARGET\" && echo \"> git checkout $TARGET\" && git checkout \"$TARGET\""
diff --git a/.zshrc.local b/.zshrc.local
@@ -11,6 +11,7 @@ alias screen="TERM=screen screen"
alias ssh="TERM=xterm-256color ssh"
alias pc-ssh="TERM=xterm-256color proxychains ssh"
alias xcopy="xclip -selection clipboard"
+alias diff="diff --color=always"
# Void Linux
alias sv="doas /usr/bin/sv"
alias vsv="doas /usr/bin/vsv"