Merge upstream/master

This commit is contained in:
Daniel Carrillo 2022-04-03 13:28:52 +02:00
commit fca913eded
3 changed files with 27 additions and 14 deletions

View File

@ -34,10 +34,10 @@ fi
# here, we check for dropin/multi-threaded replacements
# this should eventually be moved to modules/archive/init.zsh
# as a global alias
if (( $+commands[pigz] )); then
_gzip_bin='pigz'
if (( $+commands[unpigz] )); then
_gzip_bin='unpigz'
else
_gzip_bin='gzip'
_gzip_bin='gunzip'
fi
if (( $+commands[pixz] )); then
@ -46,12 +46,12 @@ else
_xz_bin='xz'
fi
if (( $+commands[lbzip2] )); then
_bzip2_bin='lbzip2'
elif (( $+commands[pbzip2] )); then
_bzip2_bin='pbzip2'
if (( $+commands[lbunzip2] )); then
_bzip2_bin='lbunzip2'
elif (( $+commands[pbunzip2] )); then
_bzip2_bin='pbunzip2'
else
_bzip2_bin='bzip2'
_bzip2_bin='bunzip2'
fi
_zstd_bin='zstd'

View File

@ -417,6 +417,11 @@ function git-info {
if (( dirty > 0 )); then
zstyle -s ':prezto:module:git:info:dirty' format 'dirty_format'
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
# Overwrite branch format to use dirty-branch format
zstyle -s ':prezto:module:git:info:dirty-branch' format 'branch_format'
if [[ -n "$branch" && -n "$branch_format" ]]; then
zformat -f branch_formatted "$branch_format" "b:$branch"
fi
else
zstyle -s ':prezto:module:git:info:clean' format 'clean_formatted'
fi

View File

@ -9,7 +9,7 @@
# Browser
#
if [[ "$OSTYPE" == darwin* ]]; then
if [[ -z "$BROWSER" && "$OSTYPE" == darwin* ]]; then
export BROWSER='open'
fi
@ -17,9 +17,15 @@ fi
# Editors
#
export EDITOR='nano'
export VISUAL='nano'
export PAGER='less'
if [[ -z "$EDITOR" ]]; then
export EDITOR='nano'
fi
if [[ -z "$VISUAL" ]]; then
export VISUAL='nano'
fi
if [[ -z "$PAGER" ]]; then
export PAGER='less'
fi
#
# Language
@ -54,10 +60,12 @@ path=(
# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X to enable it.
export LESS='-g -i -M -R -S -w -X -z-4'
if [[ -z "$LESS" ]]; then
export LESS='-g -i -M -R -S -w -X -z-4'
fi
# Set the Less input preprocessor.
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
if [[ -z "$LESSOPEN" ]] && (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
fi