Various
This commit is contained in:
parent
0ee03a1173
commit
c427ac3370
6 changed files with 43 additions and 11 deletions
|
@ -5,4 +5,12 @@
|
|||
#
|
||||
|
||||
export TIME_STYLE='+%Y-%m-%d %H:%M:%S'
|
||||
export LESS=-R
|
||||
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
|
||||
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
|
||||
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
|
||||
export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
|
||||
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
||||
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
||||
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
||||
eval $(dircolors --sh)
|
||||
|
|
|
@ -14,7 +14,7 @@ HISTFILE="$HOME/.cache/shell_history"
|
|||
# Completion for existing commands
|
||||
|
||||
alias cp="cp -i --reflink=auto"
|
||||
alias grep="grep --color=tty"
|
||||
alias grep="grep --color=auto"
|
||||
alias dd='dd status=progress'
|
||||
alias rm='rm -v --one-file-system'
|
||||
alias free='free -m'
|
||||
|
|
|
@ -87,21 +87,33 @@ appendpath() {
|
|||
*:"$1":*) ;;
|
||||
|
||||
*)
|
||||
# TODO Reverse order: I want the latest ones to supersedes the older ones
|
||||
export PATH="${PATH:+$PATH:}$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
appendpath '/usr/lib/ccache/bin'
|
||||
appendpath "${GOPATH}/bin"
|
||||
appendpath "$HOME/.local/bin"
|
||||
appendpath "$HOME/.config/scripts"
|
||||
prependpath() {
|
||||
if [ ! -d "$1" ]; then
|
||||
return
|
||||
fi
|
||||
case ":$PATH:" in
|
||||
*:"$1":*) ;;
|
||||
|
||||
*)
|
||||
export PATH="$1${PATH:+:$PATH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
prependpath '/usr/lib/ccache/bin'
|
||||
prependpath "${GOPATH}/bin"
|
||||
prependpath "$HOME/.local/bin"
|
||||
prependpath "$HOME/.config/scripts"
|
||||
|
||||
# If running on termux, load those extra scripts
|
||||
[ -d /data/data/com.termux/ ] && (
|
||||
appendpath "$HOME/.termux/scripts"
|
||||
appendpath "$HOME/.termux/bin"
|
||||
prependpath "$HOME/.termux/scripts"
|
||||
prependpath "$HOME/.termux/bin"
|
||||
)
|
||||
|
||||
# For superseding commands with better ones if they are present
|
||||
|
|
|
@ -169,7 +169,7 @@ chpwd() {
|
|||
print -l $PWD ${(u)dirstack} >$DIRSTACKFILE
|
||||
}
|
||||
|
||||
DIRSTACKSIZE=100
|
||||
DIRSTACKSIZE=20
|
||||
|
||||
setopt AUTO_PUSHD PUSHD_SILENT PUSHD_TO_HOME
|
||||
setopt PUSHD_IGNORE_DUPS # Remove duplicate entries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue