File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -315,3 +315,26 @@ log_event() {
315315 ;;
316316 esac
317317}
318+
319+ #############################################
320+ # bat
321+ #############################################
322+ pager() {
323+ local FIRST_ARG=${1:-""}
324+ local EXTRA_ARGS=("${@:2}")
325+ BAT_ARGS=(
326+ "bat"
327+ "--force-colorization"
328+ "--pager"
329+ "less"
330+ )
331+ if [ -t 0 ]; then
332+ BAT_ARGS+=("${FIRST_ARG}")
333+ else
334+ if [ -n "${FIRST_ARG}" ]; then
335+ BAT_ARGS+=("--language=${FIRST_ARG}")
336+ fi
337+ fi
338+ BAT_ARGS+=("${EXTRA_ARGS[@]}")
339+ "${BAT_ARGS[@]}"
340+ }
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ export EDITOR="nano"
66export AWS_PAGER=""
77export SHOW_AWS_PROMPT="false"
88export PROMPT_EOL_MARK=""
9+ export LESS="-R --use-color --mouse --wheel-lines=3"
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ plugins=(
2525)
2626
2727if ! command -v omz & > /dev/null; then
28+ export DISABLE_AUTO_UPDATE=" 1"
2829 source " ${ZSH} /oh-my-zsh.sh"
2930fi
3031
You can’t perform that action at this time.
0 commit comments