mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Merge branch 'plugin-git' into merge
Conflicts: custom/aliases.zsh plugins/git/git-aliases.plugin.zsh plugins/git/git-prompt-old.plugin.zsh plugins/git/git-prompt.plugin.zsh plugins/git/git.plugin.zsh themes/ashleydev.zsh-theme
This commit is contained in:
commit
415bdbfe6d
135 changed files with 2170 additions and 1523 deletions
122
lib/aliases.zsh
122
lib/aliases.zsh
|
|
@ -1,24 +1,112 @@
|
|||
# Push and pop directories on directory stack
|
||||
# The 'ls' family
|
||||
# ------------------------------------------------------------------------------
|
||||
if [[ "$DISABLE_COLOR" != 'true' ]]; then
|
||||
if (( ${+commands[dircolors]} )); then
|
||||
dircolors="${commands[dircolors]}"
|
||||
fi
|
||||
if (( ${+commands[gdircolors]} )); then
|
||||
dircolors="${commands[gdircolors]}"
|
||||
fi
|
||||
if [[ -x "$dircolors" ]] && [[ -e "$HOME/.dir_colors" ]]; then
|
||||
eval $("$dircolors" "$HOME/.dir_colors")
|
||||
alias ls='ls -hF --group-directories-first --color=auto'
|
||||
else
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS="exfxcxdxbxegedabagacad"
|
||||
alias ls='ls -G -F'
|
||||
fi
|
||||
fi
|
||||
|
||||
alias ll='ls -lh' # Show human readable.
|
||||
alias l='ls -lha' # Show hidden files.
|
||||
alias la='ls -lhA' # Show hidden files.
|
||||
alias lx='ls -lhXB' # Sort by extension.
|
||||
alias lk='ls -lhSr' # Sort by size, biggest 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 lt='ls -lhtr' # Sort by date, most recent last.
|
||||
alias lm='ls -lha | more' # Pipe through 'more'.
|
||||
alias lr='ls -lhR' # Recursive ls.
|
||||
|
||||
# General
|
||||
# ------------------------------------------------------------------------------
|
||||
alias rm='nocorrect rm -i'
|
||||
alias cp='nocorrect cp -i'
|
||||
alias mv='nocorrect mv -i'
|
||||
alias ln='nocorrect ln -i'
|
||||
alias mkdir='nocorrect mkdir -p'
|
||||
alias du='du -kh'
|
||||
alias df='df -kh'
|
||||
alias pu='pushd'
|
||||
alias po='popd'
|
||||
|
||||
# Basic directory operations
|
||||
alias ...='cd ../..'
|
||||
alias -- -='cd -'
|
||||
|
||||
# Super user
|
||||
alias _='sudo'
|
||||
|
||||
#alias g='grep -in'
|
||||
|
||||
# Show history
|
||||
alias e="$EDITOR"
|
||||
alias history='fc -l 1'
|
||||
alias get='curl -C - -O'
|
||||
alias q='exit'
|
||||
alias ssh='ssh -X'
|
||||
alias h='history'
|
||||
alias j='jobs -l'
|
||||
alias f='fg'
|
||||
alias gr='grep -r'
|
||||
alias afind='ack -il'
|
||||
alias type='type -a'
|
||||
# alias ssh='ssh -X'
|
||||
alias print-path='echo -e ${PATH//:/\\n}'
|
||||
alias t="t --task-dir ~/.tasks --list todo.txt --delete-if-empty"
|
||||
|
||||
# List direcory contents
|
||||
alias lsa='ls -lah'
|
||||
alias l='ls -la'
|
||||
alias ll='ls -l'
|
||||
alias sl=ls # often screw this up
|
||||
alias z='vim -o ~/.zshenv ~/.oh-my-zsh/lib/aliases.zsh ~/.zshrc'
|
||||
alias zs='source ~/.zshrc'
|
||||
|
||||
alias afind='ack-grep -il'
|
||||
if [[ "$EDITOR" = vi* ]]; then
|
||||
alias v.='vim .'
|
||||
alias v='vim ~/.vimrc'
|
||||
alias VS='vim -S Session.vim'
|
||||
fi
|
||||
|
||||
if [[ -x "${commands[htop]}" ]]; then
|
||||
alias top=htop
|
||||
else
|
||||
alias topm='top -o vsize'
|
||||
alias topc='top -o cpu'
|
||||
fi
|
||||
|
||||
if [[ "$DISABLE_COLOR" != 'true' ]]; then
|
||||
if [[ -x "${commands[colordiff]}" ]]; then
|
||||
alias diff='colordiff'
|
||||
fi
|
||||
|
||||
if [[ -x "${commands[colormake]}" ]]; then
|
||||
alias make='colormake'
|
||||
fi
|
||||
fi
|
||||
|
||||
# Terminal Multiplexer
|
||||
# ------------------------------------------------------------------------------
|
||||
local screenrc tmuxconf
|
||||
if [[ "$TERM" == 'xterm-color' ]]; then
|
||||
if [[ -e "$HOME/.screenrc" ]]; then
|
||||
screenrc="-c '$HOME/.screenrc'"
|
||||
fi
|
||||
if [[ -e "$HOME/.tmux.conf" ]]; then
|
||||
tmuxconf="-f '$HOME/.tmux.conf'"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$TERM" == 'xterm-256color' ]]; then
|
||||
if [[ -e "$HOME/.screenrc256" ]]; then
|
||||
screenrc="-c '$HOME/.screenrc256'"
|
||||
fi
|
||||
if [[ -e "$HOME/.tmux256.conf" ]]; then
|
||||
tmuxconf="-f '$HOME/.tmux256.conf'"
|
||||
fi
|
||||
fi
|
||||
|
||||
alias screen="screen $screenrc"
|
||||
alias sl="screen $screenrc -list"
|
||||
alias sr="screen $screenrc -a -A -U -D -R"
|
||||
alias S="screen $screenrc -U -S"
|
||||
|
||||
alias tmux="tmux $tmuxconf"
|
||||
alias tls="tmux list-sessions"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue