long time no commit
This commit is contained in:
134
.yadm/alt/codeshell/.zshrc
Normal file
134
.yadm/alt/codeshell/.zshrc
Normal file
@@ -0,0 +1,134 @@
|
||||
### =============== Git prompt ================ ###
|
||||
source "/home/snarbutas/.zsh-git-prompt/zshrc.sh"
|
||||
ZSH_THEME_GIT_PROMPT_BRANCH="%{\x1b[3m%}%{$fg[cyan]%}"
|
||||
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}%{¤%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[blue]%}%{x%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[red]%}%{+%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[red]%}%{↓%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[blue]%}%{↑%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}%{…%G%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}%{✔%G%}"
|
||||
### =============== Git prompt ================ ###
|
||||
|
||||
## Enable completion
|
||||
zstyle ':completion:*' completer _complete _ignored
|
||||
zstyle ':completion:*' menu select
|
||||
setopt completealiases
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
## Enable ANSI colors
|
||||
autoload -U color
|
||||
|
||||
## Set various options
|
||||
setopt appendhistory nomatch notify
|
||||
unsetopt autocd beep extendedglob
|
||||
bindkey -e
|
||||
|
||||
## History
|
||||
setopt HIST_IGNORE_DUPS
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
|
||||
## Automatically fix terminal settings
|
||||
ttyctl -f
|
||||
stty -ixon -ixoff
|
||||
|
||||
## Set a nice prompt
|
||||
PROMPT='%F{red}[%F{blue}%*%F{red}]%f %F{yellow}bosman%f %F{magenta}[%f%B%F{magenta}%1~%f%b%F{magenta}]%f %(!.%F{red}.%F{green})≫ %f$(git_super_status) '
|
||||
#RPROMPT=$'%F{cyan}%*%f'
|
||||
|
||||
## Set a nice remote prompt
|
||||
YELLOW="\[\033[38;5;3m\]"
|
||||
BLUE="\[\033[38;5;4m\]"
|
||||
ORANGE="\[\033[38;5;202m\]"
|
||||
MAGENTA="\[\033[38;5;6m\]"
|
||||
GREEN="\[\033[38;5;41m\]"
|
||||
NOCOLOR="\[\033[0m\]"
|
||||
BOL_FANCYPROMPT="${ORANGE}[${BLUE}\t${ORANGE}] ${YELLOW}\h ${MAGENTA}\W ${GREEN}≫${NOCOLOR} "
|
||||
export BOL_FANCYPROMPT
|
||||
|
||||
## Enable colors
|
||||
LESS='-R'
|
||||
LESSOPEN='|~/.lessfilter %s'
|
||||
|
||||
## Setup editor and pager variables
|
||||
PAGER="less"
|
||||
EDITOR="nvim"
|
||||
VISUAL="${EDITOR}"
|
||||
#TERM="xterm-termite"
|
||||
export PAGER EDITOR VISUAL
|
||||
|
||||
## Setup the CDPATH with interesting directories
|
||||
typeset -U path cdpath fpath
|
||||
cdpath=(
|
||||
.
|
||||
~/vagrant
|
||||
)
|
||||
eval "$(rbenv init -)"
|
||||
|
||||
alias ll='ls -ltrh'
|
||||
alias cat='bat'
|
||||
alias vi='nvim'
|
||||
|
||||
# create a zkbd compatible hash;
|
||||
# to add other keys to this hash, see: man 5 terminfo
|
||||
typeset -A key
|
||||
|
||||
key[Home]=${terminfo[khome]}
|
||||
key[End]=${terminfo[kend]}
|
||||
key[Insert]=${terminfo[kich1]}
|
||||
key[Delete]=${terminfo[kdch1]}
|
||||
key[Up]=${terminfo[kcuu1]}
|
||||
key[Down]=${terminfo[kcud1]}
|
||||
key[Left]=${terminfo[kcub1]}
|
||||
key[Right]=${terminfo[kcuf1]}
|
||||
key[PageUp]=${terminfo[kpp]}
|
||||
key[PageDown]=${terminfo[knp]}
|
||||
|
||||
# setup key accordingly
|
||||
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
|
||||
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
|
||||
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
|
||||
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
|
||||
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
|
||||
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
|
||||
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
|
||||
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
|
||||
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
|
||||
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
|
||||
|
||||
# ssh, scp, ping, host
|
||||
zstyle ':completion:*:scp:*' tag-order \
|
||||
'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *'
|
||||
zstyle ':completion:*:scp:*' group-order \
|
||||
users files all-files hosts-domain hosts-host hosts-ipaddr
|
||||
zstyle ':completion:*:ssh:*' tag-order \
|
||||
users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *'
|
||||
zstyle ':completion:*:ssh:*' group-order \
|
||||
hosts-domain hosts-host users hosts-ipaddr
|
||||
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-host' ignored-patterns \
|
||||
'*.*' loopback localhost
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns \
|
||||
'<->.<->.<->.<->' '^*.*' '*@*'
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns \
|
||||
'^<->.<->.<->.<->' '127.0.0.<->'
|
||||
zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns \
|
||||
adm bin daemon halt lp named shutdown sync
|
||||
|
||||
zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}//,/ }
|
||||
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
|
||||
${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
bindkey "^[OA" history-beginning-search-backward
|
||||
bindkey "^[OB" history-beginning-search-forward
|
||||
|
||||
# The next line updates PATH for the Google Cloud SDK.
|
||||
if [ -f /opt/google-cloud-sdk/path.zsh.inc ]; then
|
||||
source '/opt/google-cloud-sdk/path.zsh.inc'
|
||||
fi
|
||||
source ~/.zsh.d/11-go.zsh
|
||||
Reference in New Issue
Block a user