rigoletto@
Developer
Hello,
I've just switched to shells/zsh, managed to do the basic configuration and "imported" what I have set in my .tcshrc. Still a working in progress but working fine already, but have some tips (there is too much noise around the interwebs)?
Btw, I tried to use THIS plugin by either sourcing it and put into .zshrc but err ... didn't work at all.
Thanks!
I've just switched to shells/zsh, managed to do the basic configuration and "imported" what I have set in my .tcshrc. Still a working in progress but working fine already, but have some tips (there is too much noise around the interwebs)?
Btw, I tried to use THIS plugin by either sourcing it and put into .zshrc but err ... didn't work at all.
Code:
# ZSH Configuration File
# ---------------------------
# Set **** -------------------------------------------
bindkey -e
autoload -Uz compinit
compinit
zstyle ':completion:*' menu select
zstyle ':completion:*' rehash true
setopt complete_aliases
setopt correct
setopt hist_ignore_dups
setopt noflowcontrol
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# Keybindings ----------------------------------------
bindkey "^[[7~" beginning-of-line
bindkey "^[[8~" end-of-line
bindkey "\e[2~" overwrite-mode
bindkey "\e[3~" delete-char
bindkey "^[Od" backward-word
bindkey "\e[1;5D" backward-word
bindkey "^[Oc" forward-word
bindkey "\e[1;5C" forward-word
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey "\e[5~" history-search-backward
bindkey "\e[6~" history-search-forward
bindkey "^W" backward-delete-word
# Aliases --------------------------------------------
alias mv='nocorrect mv' # no spelling correction on mv
alias cp='nocorrect cp' # no spelling correction on cp
alias mkdir='nocorrect mkdir' # no spelling correction on mkdir
alias j=jobs
alias pu=pushd
alias po=popd
alias d='dirs -v'
alias h=history
alias grep=egrep
alias ll='ls -l'
alias la='ls -a'
alias tb='nc termbin.com 9999'
alias ssh-add='ssh-add ~/.ssh/{private-id_rsa,freebsd-id_ed25519,lbdm-id_rsa}'
# PROMPT ---------------------------------------------
if [[ $USER == root ]]; then
PROMPT=""$'\n'"%B%F{blue}%~%f %F{red}%m"$'\n'"❱❱❱%b%f "
else
PROMPT=""$'\n'"%B%F{red}%~%f %F{blue}%m"$'\n'"❱❱❱%b%f "
fi
function preexec() {
timer=${timer:-$SECONDS}
}
function precmd() {
if [ $timer ]; then
timer_show=$(($SECONDS - $timer))
export RPROMPT="%B%F{yellow}${timer_show}s %b%f"
unset timer
fi
}
# Syntax Highlightng ---------------------------------
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# vim: tw=0 fo-=anw
## EOF ##
Thanks!