configs/home/.zsh-server/zshrc

60 lines
1.8 KiB
Bash
Raw Normal View History

2023-01-07 21:57:26 +01:00
### ENVVARS
export EDITOR=vim
2023-01-16 21:53:31 +01:00
### Aliases
2023-01-07 21:57:26 +01:00
alias l="ls --color -lah"
alias ll="ls --color -lh"
alias la="ls --color -ah"
alias ls="ls --color -h"
2023-01-07 23:30:33 +01:00
alias rm='echo "If you really want to use rm, use purge.\nOtherwise, please consider using trash instead: trash"'
2023-01-07 22:40:09 +01:00
alias purge="/usr/bin/rm"
2023-01-07 23:30:33 +01:00
alias sudo='nocorrect sudo '
2023-01-07 23:58:53 +01:00
alias grep="grep --color"
alias egrep="grep -E"
alias lgrep="find | grep"
2023-01-16 21:53:31 +01:00
alias psgrep="ps axu | grep"
alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"'
2023-01-07 21:57:26 +01:00
### ZSH HOME
export ZSH=$HOME/.zsh-server
### ---- history config -------------------------------------
export HISTFILE=$ZSH/.zsh_history
# How many commands zsh will load to memory.
export HISTSIZE=10000
# How many commands history will save on file.
export SAVEHIST=10000
# History won't save duplicates.
setopt HIST_IGNORE_ALL_DUPS
# History won't show duplicates on search.
setopt HIST_FIND_NO_DUPS
### ---- zsh options -------------------------------------
setopt autocd
### --- Inputs Config ------------------------------------
# vim keys, then override stuff.
bindkey -v
2023-01-07 21:57:26 +01:00
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey -s "^X" 'n^M'
### ---- PLUGINS & THEMES -----------------------------------
PS1='%B%F{red}%n@%m%k %B%F{cyan}%(4~|...|)%3~%F{white} %# %b%f%k'
2023-01-07 21:57:26 +01:00
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
2023-01-07 22:27:53 +01:00
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
2023-01-07 21:57:26 +01:00
fpath=($ZSH/plugins/zsh-completions/src $fpath)
### --- fzf Config ------------------------------------
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
export FZF_CTRL_R_OPTS='--no-sort --exact'
### --- nnn Config ------------------------------------
source /usr/share/nnn/quitcd/quitcd.bash_zsh