Update zshrc
This commit is contained in:
parent
ee2e701408
commit
909786b421
1 changed files with 26 additions and 8 deletions
34
zshrc
34
zshrc
|
@ -12,8 +12,8 @@ autoload -U $HOME/.zsh/functions/*(:t)
|
||||||
HISTFILE=$HOME/.zsh/histfile
|
HISTFILE=$HOME/.zsh/histfile
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
SAVEHIST=1000
|
SAVEHIST=1000
|
||||||
LESSCMD="/usr/bin/less -FXRS"
|
|
||||||
|
|
||||||
|
export LESS="iFXRS"
|
||||||
export LESS_TERMCAP_mb=$'\e[1;37m'
|
export LESS_TERMCAP_mb=$'\e[1;37m'
|
||||||
export LESS_TERMCAP_md=$'\e[1;37m'
|
export LESS_TERMCAP_md=$'\e[1;37m'
|
||||||
export LESS_TERMCAP_me=$'\e[0m'
|
export LESS_TERMCAP_me=$'\e[0m'
|
||||||
|
@ -21,13 +21,12 @@ export LESS_TERMCAP_se=$'\e[0m'
|
||||||
export LESS_TERMCAP_so=$'\e[1;47;30m'
|
export LESS_TERMCAP_so=$'\e[1;47;30m'
|
||||||
export LESS_TERMCAP_ue=$'\e[0m'
|
export LESS_TERMCAP_ue=$'\e[0m'
|
||||||
export LESS_TERMCAP_us=$'\e[0;36m'
|
export LESS_TERMCAP_us=$'\e[0;36m'
|
||||||
export PAGER=$LESSCMD
|
export PAGER="less"
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias alpine="alpine -p ""{imap.gmail.com/ssl/user=tom.willemsen@archlinux.us}remote_pinerc"""
|
alias alpine="alpine -p ""{imap.gmail.com/ssl/user=tom.willemsen@archlinux.us}remote_pinerc"""
|
||||||
alias evolus-pencil="/usr/lib/evolus-pencil-svn/evolus-pencil.sh"
|
alias evolus-pencil="/usr/lib/evolus-pencil-svn/evolus-pencil.sh"
|
||||||
alias grep="grep --color=always"
|
alias grep="grep --color=always"
|
||||||
alias less=$LESSCMD
|
|
||||||
alias ls="ls -F --color=always"
|
alias ls="ls -F --color=always"
|
||||||
alias mysql="mysql --pager"
|
alias mysql="mysql --pager"
|
||||||
alias sbcl="rlwrap sbcl"
|
alias sbcl="rlwrap sbcl"
|
||||||
|
@ -36,12 +35,12 @@ alias sbcl="rlwrap sbcl"
|
||||||
alias -s pdf="zathura"
|
alias -s pdf="zathura"
|
||||||
alias -s xls="libreoffice"
|
alias -s xls="libreoffice"
|
||||||
|
|
||||||
setopt AUTO_CD
|
setopt AUTO_PUSHD # Automatically add to directory stack
|
||||||
setopt AUTO_PUSHD
|
setopt CORRECT # Offer to correct my mistakes
|
||||||
setopt CORRECT
|
setopt EXTENDED_GLOB # Add extra globbing patterns
|
||||||
setopt EXTENDED_GLOB
|
setopt NOTIFY # Don't wait to show status of jobs
|
||||||
setopt NOTIFY
|
|
||||||
setopt PROMPT_SUBST # Allow for functions in the prompt
|
setopt PROMPT_SUBST # Allow for functions in the prompt
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS # Don't story any duplicate commands
|
||||||
|
|
||||||
zstyle :compinstall filename '$HOME/.zshrc'
|
zstyle :compinstall filename '$HOME/.zshrc'
|
||||||
|
|
||||||
|
@ -64,10 +63,24 @@ PROMPT='${vcs_info_msg_0_}
|
||||||
|
|
||||||
# Set terminal name to current running application
|
# Set terminal name to current running application
|
||||||
case $TERM in
|
case $TERM in
|
||||||
|
eterm-color*)
|
||||||
|
# Make {{ansi,multi}-,}term change Emacs' `default-directory'
|
||||||
|
# and keep track of the current user and host.
|
||||||
|
precmd () { print -P "\eAnSiTu %n\n\eAnSiTc %~" }
|
||||||
|
;;
|
||||||
rxvt*)
|
rxvt*)
|
||||||
precmd () { print -Pn "\e]0;%~\a" }
|
precmd () { print -Pn "\e]0;%~\a" }
|
||||||
preexec () { print -Pn "\e]0;$1\a" }
|
preexec () { print -Pn "\e]0;$1\a" }
|
||||||
;;
|
;;
|
||||||
|
screen)
|
||||||
|
# Make screen show the current running command as window title
|
||||||
|
# or the shell if no command is running. The running command
|
||||||
|
# is presented as the first sequence of characters without a
|
||||||
|
# space on the given command line, possibly prefixed with
|
||||||
|
# `sudo '.
|
||||||
|
preexec () { print -Pn "\ek$(basename $1 | sed -e 's/^\(\(sudo \)\?[^ ]\+\).*/\1/')\e\\" }
|
||||||
|
precmd () { print -Pn "\ek$(basename $SHELL)\e\\" }
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
|
@ -75,6 +88,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
|
||||||
zle -N emacs-backward-kill-word
|
zle -N emacs-backward-kill-word
|
||||||
|
zle -N insert-sudo
|
||||||
|
|
||||||
# Set terminal keys
|
# Set terminal keys
|
||||||
bindkey "\e[1~" beginning-of-line
|
bindkey "\e[1~" beginning-of-line
|
||||||
|
@ -101,6 +115,7 @@ bindkey "\e[F" end-of-line
|
||||||
|
|
||||||
bindkey "^W" backward-delete-char
|
bindkey "^W" backward-delete-char
|
||||||
bindkey "^\b" emacs-backward-kill-word
|
bindkey "^\b" emacs-backward-kill-word
|
||||||
|
bindkey "^[#" insert-sudo
|
||||||
|
|
||||||
source /usr/share/zsh/scripts/antigen/antigen.zsh
|
source /usr/share/zsh/scripts/antigen/antigen.zsh
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
|
@ -131,3 +146,6 @@ fi
|
||||||
|
|
||||||
compinit
|
compinit
|
||||||
colors # Initialize colors.
|
colors # Initialize colors.
|
||||||
|
|
||||||
|
# Setup rbenv
|
||||||
|
eval "$(rbenv init -)"
|
||||||
|
|
Loading…
Reference in a new issue