mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Merge with upstream.
This commit is contained in:
commit
9ab8458a11
46 changed files with 2319 additions and 126 deletions
24
lib/aliases.zsh
Normal file
24
lib/aliases.zsh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Push and pop directories on directory stack
|
||||
alias pu='pushd'
|
||||
alias po='popd'
|
||||
|
||||
# Basic directory operations
|
||||
alias ...='cd ../..'
|
||||
alias -- -='cd -'
|
||||
|
||||
# Super user
|
||||
alias _='sudo'
|
||||
|
||||
#alias g='grep -in'
|
||||
|
||||
# Show history
|
||||
alias history='fc -l 1'
|
||||
|
||||
# List direcory contents
|
||||
alias lsa='ls -lah'
|
||||
alias l='ls -la'
|
||||
alias ll='ls -l'
|
||||
alias sl=ls # often screw this up
|
||||
|
||||
alias afind='ack-grep -il'
|
||||
|
||||
|
|
@ -57,3 +57,12 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
|
|||
# ... unless we really want to.
|
||||
zstyle '*' single-ignored show
|
||||
|
||||
if [ "$DISABLE_COMPLETION_WAITING_DOTS" != "true" ]; then
|
||||
expand-or-complete-with-dots() {
|
||||
echo -n "\e[31m......\e[0m"
|
||||
zle expand-or-complete
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-with-dots
|
||||
bindkey "^I" expand-or-complete-with-dots
|
||||
fi
|
||||
|
|
|
|||
3
lib/edit-command-line.zsh
Normal file
3
lib/edit-command-line.zsh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
autoload -U edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey '\C-x\C-e' edit-command-line
|
||||
|
|
@ -45,3 +45,4 @@ function extract() {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ git_prompt_status() {
|
|||
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^D ' &> /dev/null); then
|
||||
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
|
||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||
fi
|
||||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ bindkey ' ' magic-space # also do history expansion on space
|
|||
bindkey '^[[Z' reverse-menu-complete
|
||||
|
||||
# Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~
|
||||
bindkey '^?' backward-delete-char
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
bindkey "\e[3~" delete-char
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ setopt long_list_jobs
|
|||
|
||||
## pager
|
||||
export PAGER='less -R'
|
||||
export LC_CTYPE=en_US.UTF-8
|
||||
export LC_CTYPE=$LANG
|
||||
|
||||
## pretty man pages
|
||||
function pman() {
|
||||
|
|
@ -23,9 +23,6 @@ function pj() {
|
|||
python -mjson.tool
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
## Open current directory
|
||||
alias oo='open .'
|
||||
|
||||
|
|
|
|||
|
|
@ -18,3 +18,11 @@ for color in {000..255}; do
|
|||
FG[$color]="%{[38;5;${color}m%}"
|
||||
BG[$color]="%{[48;5;${color}m%}"
|
||||
done
|
||||
|
||||
# Show all 256 colors with color number
|
||||
function spectrum_ls() {
|
||||
for code in {000..255}; do
|
||||
print -P -- "$code: %F{$code}Test%f"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue