mirror of
https://github.com/zdharma-continuum/zsh-diff-so-fancy.git
synced 2026-09-10 07:16:24 -04:00
fix: formatting & zsh plugin standard
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
parent
dc8cdadc46
commit
9cc9af3d4e
|
|
@ -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 "$@"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue