fix: formatting & zsh plugin standard

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
Vladislav Doster 2023-11-29 02:22:43 -06:00
parent dc8cdadc46
commit 9cc9af3d4e
2 changed files with 8 additions and 7 deletions

View file

@ -3,9 +3,9 @@
# Git will search $PATH for this file, when invoked by "git dsf ...".
f() {
[ -z "$GIT_PREFIX" ] || \
cd "$GIT_PREFIX" && \
git diff --color "$@" | diff-so-fancy | less --tabs=4 -iRFX
[ -z "$GIT_PREFIX" ] \
|| cd "$GIT_PREFIX" \
&& git diff --color "$@" | diff-so-fancy | less --tabs=4 -iRFX
}
f "$@"

View file

@ -6,9 +6,10 @@
# See following web page for explanation of the line "ZERO=...":
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
local _pth="${0:h}/bin"
0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}"
0="${${(M)0:#/*}:-$PWD/$0}"
local diff_so_fancy_bin="${0:h}/bin"
if [[ -z "${path[(r)$_pth]}" ]]; then
path+=( "$_pth" )
if [[ -z "${path[(r)${diff_so_fancy_bin}]}" ]]; then
path+=( "${diff_so_fancy_bin}" )
fi