|
|
@ -1,32 +1,35 @@ |
|
|
|
# The 'ls' family |
|
|
|
# The 'ls' family |
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
[[ "$DISABLE_COLOR" != 'true' ]] && { |
|
|
|
if [[ "$DISABLE_COLOR" != 'true' ]]; then |
|
|
|
[[ -x "${commands[gdircolors]}" ]] && use_color_gnu='true' || use_color_bsd='true' |
|
|
|
if (( ${+commands[dircolors]} )); then |
|
|
|
} |
|
|
|
dircolors="${commands[dircolors]}" |
|
|
|
|
|
|
|
fi |
|
|
|
[[ "$use_color_gnu" == 'true' && -e "$HOME/.dir_colors" ]] && eval $(gdircolors $HOME/.dir_colors) |
|
|
|
if (( ${+commands[gdircolors]} )); then |
|
|
|
[[ "$use_color_bsd" == 'true' ]] && export CLICOLOR=1 |
|
|
|
dircolors="${commands[gdircolors]}" |
|
|
|
[[ "$use_color_bsd" == 'true' ]] && export LSCOLORS="exfxcxdxbxegedabagacad" |
|
|
|
fi |
|
|
|
|
|
|
|
if [[ -x "$dircolors" ]] && [[ -e "$HOME/.dir_colors" ]]; then |
|
|
|
# add colors for filetype recognition |
|
|
|
eval $("$dircolors" "$HOME/.dir_colors") |
|
|
|
[[ "$use_color_gnu" == 'true' ]] && alias ls='ls -hF --group-directories-first --color=auto' |
|
|
|
alias ls='ls -hF --group-directories-first --color=auto' |
|
|
|
[[ "$use_color_bsd" == 'true' ]] && alias ls='ls -G -F' |
|
|
|
else |
|
|
|
|
|
|
|
export CLICOLOR=1 |
|
|
|
|
|
|
|
export LSCOLORS="exfxcxdxbxegedabagacad" |
|
|
|
|
|
|
|
alias ls='ls -G -F' |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
alias ll='ls -lh' # show human readable |
|
|
|
alias ll='ls -lh' # Show human readable. |
|
|
|
alias la='ls -lhA' # show hidden files |
|
|
|
alias la='ls -lhA' # Show hidden files. |
|
|
|
alias lx='ls -lhXB' # sort by extension |
|
|
|
alias lx='ls -lhXB' # Sort by extension. |
|
|
|
alias lk='ls -lhSr' # sort by size, biggest last |
|
|
|
alias lk='ls -lhSr' # Sort by size, biggest last. |
|
|
|
alias lc='ls -lhtcr' # sort by and show change time, most recent last |
|
|
|
alias lc='ls -lhtcr' # Sort by and show change time, most recent lasa. |
|
|
|
alias lu='ls -lhtur' # sort by and show access time, most recent last |
|
|
|
alias lu='ls -lhtur' # Sort by and show access time, most recent last. |
|
|
|
alias lt='ls -lhtr' # sort by date, most recent last |
|
|
|
alias lt='ls -lhtr' # Sort by date, most recent last. |
|
|
|
alias lm='ls -lha | more' # pipe through 'more' |
|
|
|
alias lm='ls -lha | more' # Pipe through 'more'. |
|
|
|
alias lr='ls -lhR' # recursive ls |
|
|
|
alias lr='ls -lhR' # Recursive ls. |
|
|
|
alias sl='ls' # often screw this up |
|
|
|
alias sl='ls' # I often screw this up. |
|
|
|
|
|
|
|
|
|
|
|
# General |
|
|
|
# General |
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
alias ...='cd ../..' |
|
|
|
|
|
|
|
alias -- -='cd -' |
|
|
|
|
|
|
|
alias rm='nocorrect rm -i' |
|
|
|
alias rm='nocorrect rm -i' |
|
|
|
alias cp='nocorrect cp -i' |
|
|
|
alias cp='nocorrect cp -i' |
|
|
|
alias mv='nocorrect mv -i' |
|
|
|
alias mv='nocorrect mv -i' |
|
|
@ -38,20 +41,13 @@ alias pu='pushd' |
|
|
|
alias po='popd' |
|
|
|
alias po='popd' |
|
|
|
alias _='sudo' |
|
|
|
alias _='sudo' |
|
|
|
alias e="$EDITOR" |
|
|
|
alias e="$EDITOR" |
|
|
|
alias q='exit' |
|
|
|
|
|
|
|
alias history='fc -l 1' |
|
|
|
alias history='fc -l 1' |
|
|
|
alias h='history' |
|
|
|
|
|
|
|
alias j='jobs -l' |
|
|
|
|
|
|
|
alias f='fg' |
|
|
|
|
|
|
|
alias gr='grep -r' |
|
|
|
|
|
|
|
alias get='curl -C - -O' |
|
|
|
alias get='curl -C - -O' |
|
|
|
alias afind='ack-grep -il' |
|
|
|
alias afind='ack -il' |
|
|
|
alias type='type -a' |
|
|
|
alias type='type -a' |
|
|
|
alias ssh='ssh -X' |
|
|
|
alias ssh='ssh -X' |
|
|
|
alias print-path='echo -e ${PATH//:/\\n}' |
|
|
|
alias print-path='echo -e ${PATH//:/\\n}' |
|
|
|
alias print-libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}' |
|
|
|
alias t="t --task-dir ~/.tasks --list todo.txt --delete-if-empty" |
|
|
|
alias lsbom='lsbom -f -l -s -pf' |
|
|
|
|
|
|
|
alias t="$HOME/.local/bin/t --task-dir ~/.tasks --list todo.txt --delete-if-empty" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -x "${commands[htop]}" ]]; then |
|
|
|
if [[ -x "${commands[htop]}" ]]; then |
|
|
|
alias top=htop |
|
|
|
alias top=htop |
|
|
@ -60,24 +56,38 @@ else |
|
|
|
alias topc='top -o cpu' |
|
|
|
alias topc='top -o cpu' |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
[[ "$DISABLE_COLOR" != 'true' ]] && { |
|
|
|
if [[ "$DISABLE_COLOR" != 'true' ]]; then |
|
|
|
[[ -x "${commands[colordiff]}" ]] && alias diff='colordiff' |
|
|
|
if [[ -x "${commands[colordiff]}" ]]; then |
|
|
|
[[ -x "${commands[colormake]}" ]] && alias make='colormake' |
|
|
|
alias diff='colordiff' |
|
|
|
} |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -x "${commands[colormake]}" ]]; then |
|
|
|
|
|
|
|
alias make='colormake' |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Screen |
|
|
|
# Terminal Multiplexer |
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
[[ "$TERM" == 'xterm-color' && -e "$HOME/.screenrc" ]] && screenrc="-c '$HOME/.screenrc'" |
|
|
|
local screenrc tmuxconf |
|
|
|
[[ "$TERM" == 'xterm-256color' && -e "$HOME/.screenrc256" ]] && screenrc="-c '$HOME/.screenrc256'" |
|
|
|
if [[ "$TERM" == 'xterm-color' ]]; then |
|
|
|
|
|
|
|
if [[ -e "$HOME/.screenrc" ]]; then |
|
|
|
|
|
|
|
screenrc="-c '$HOME/.screenrc'" |
|
|
|
|
|
|
|
tmuxconf="-f '$HOME/.tmux.conf'" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "$TERM" == 'xterm-256color' ]]; then |
|
|
|
|
|
|
|
if [[ -e "$HOME/.screenrc256" ]]; then |
|
|
|
|
|
|
|
screenrc="-c '$HOME/.screenrc256'" |
|
|
|
|
|
|
|
tmuxconf="-f '$HOME/.tmux256.conf'" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
alias screen="screen $screenrc" |
|
|
|
alias screen="screen $screenrc" |
|
|
|
alias sl="screen $screenrc -list" |
|
|
|
alias sl="screen $screenrc -list" |
|
|
|
alias sr="screen $screenrc -a -A -U -D -R" |
|
|
|
alias sr="screen $screenrc -a -A -U -D -R" |
|
|
|
alias S="screen $screenrc -U -S" |
|
|
|
alias S="screen $screenrc -U -S" |
|
|
|
|
|
|
|
|
|
|
|
# TMUX |
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------ |
|
|
|
|
|
|
|
[[ "$TERM" == 'xterm-color' && -e "$HOME/.tmux.conf" ]] && tmuxconf="-f '$HOME/.tmux.conf'" |
|
|
|
|
|
|
|
[[ "$TERM" == 'xterm-256color' && -e "$HOME/.tmux256.conf" ]] && tmuxconf="-f '$HOME/.tmux256.conf'" |
|
|
|
|
|
|
|
alias tmux="tmux $tmuxconf" |
|
|
|
alias tmux="tmux $tmuxconf" |
|
|
|
alias tls="tmux list-sessions" |
|
|
|
alias tls="tmux list-sessions" |
|
|
|
|
|
|
|
|
|
|
|