|
@@ -74,8 +74,13 @@ COLOR_RESET="$terminfo[sgr0]"
|
|
# Pager
|
|
# Pager
|
|
#
|
|
#
|
|
|
|
|
|
-VIMPAGER="$(readlink -f "${ZDOTDIR}/../tools/vimpager/vimpager")"
|
|
|
|
-if (( $+commands[vim] )) && [[ -f "${VIMPAGER}" ]]; then
|
|
|
|
|
|
+if (( $+commands[batcat] )); then
|
|
|
|
+ export PAGER=batcat
|
|
|
|
+ alias less="${PAGER}"
|
|
|
|
+ alias more="${PAGER}"
|
|
|
|
+elif (( $+commands[vim] )) && [[ -f "${VIMPAGER}" ]]; then
|
|
|
|
+ VIMPAGER="$(readlink -f "${ZDOTDIR}/../tools/vimpager/vimpager")"
|
|
|
|
+
|
|
export PAGER="${VIMPAGER}"
|
|
export PAGER="${VIMPAGER}"
|
|
alias less="${PAGER}"
|
|
alias less="${PAGER}"
|
|
alias more="${PAGER}"
|
|
alias more="${PAGER}"
|
|
@@ -83,14 +88,14 @@ if (( $+commands[vim] )) && [[ -f "${VIMPAGER}" ]]; then
|
|
if [[ ! -f "${VIMPAGER_RC}" ]]; then
|
|
if [[ ! -f "${VIMPAGER_RC}" ]]; then
|
|
unset VIMPAGER_RC
|
|
unset VIMPAGER_RC
|
|
fi
|
|
fi
|
|
|
|
+
|
|
|
|
+ unset VIMPAGER
|
|
elif (( $+commands[less] )); then
|
|
elif (( $+commands[less] )); then
|
|
export PAGER=less
|
|
export PAGER=less
|
|
alias more="${PAGER}"
|
|
alias more="${PAGER}"
|
|
elif (( $+commands[more] )); then
|
|
elif (( $+commands[more] )); then
|
|
export PAGER=more
|
|
export PAGER=more
|
|
fi
|
|
fi
|
|
-export GIT_PAGER="${PAGER}"
|
|
|
|
-unset VIMPAGER
|
|
|
|
|
|
|
|
#
|
|
#
|
|
# Vim
|
|
# Vim
|
|
@@ -110,6 +115,10 @@ fi
|
|
# Git
|
|
# Git
|
|
#
|
|
#
|
|
|
|
|
|
|
|
+if (( $+commands[delta] )); then
|
|
|
|
+ export GIT_PAGER=delta
|
|
|
|
+fi
|
|
|
|
+
|
|
GIT_OPTIONS=()
|
|
GIT_OPTIONS=()
|
|
if [[ -n "${LC_SSH_FULLNAME}" ]]; then
|
|
if [[ -n "${LC_SSH_FULLNAME}" ]]; then
|
|
GIT_OPTIONS+=(-c "user.name=${LC_SSH_FULLNAME}")
|
|
GIT_OPTIONS+=(-c "user.name=${LC_SSH_FULLNAME}")
|
|
@@ -125,6 +134,7 @@ export GIT_OPTIONS
|
|
|
|
|
|
git() {
|
|
git() {
|
|
(
|
|
(
|
|
|
|
+ export PAGER=less
|
|
export GIT_FAKE_HOME="$(readlink -f "${ZDOTDIR}/../tools/git")"
|
|
export GIT_FAKE_HOME="$(readlink -f "${ZDOTDIR}/../tools/git")"
|
|
if [[ -f "${GIT_FAKE_HOME}/.gitconfig" ]]; then
|
|
if [[ -f "${GIT_FAKE_HOME}/.gitconfig" ]]; then
|
|
export HOME="${GIT_FAKE_HOME}"
|
|
export HOME="${GIT_FAKE_HOME}"
|