fix: formatting & zsh plugin standard (#14)

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
vladislav doster 2023-11-29 02:24:22 -06:00 committed by GitHub
parent dc8cdadc46
commit a47a36b27b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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