abra zsh config 2.0

This commit is contained in:
Andrey Anurin
2018-08-12 15:26:21 +03:00
parent 201abd09c4
commit 6b114440e2
1195 changed files with 68948 additions and 10539 deletions

View File

@@ -11,23 +11,12 @@
# Load dependencies.
pmodload 'helper'
function prompt_damoekri_pwd {
local pwd="${PWD/#$HOME/~}"
if [[ "$pwd" == (#m)[/~] ]]; then
_prompt_damoekri_pwd="$MATCH"
unset MATCH
else
_prompt_damoekri_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}"
fi
}
function prompt_damoekri_precmd {
prompt_damoekri_precmd() {
setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS
# Format PWD.
prompt_damoekri_pwd
_prompt_damoekri_pwd=$(prompt-pwd)
# Get Git repository information.
if (( $+functions[git-info] )); then
@@ -43,7 +32,7 @@ function prompt_damoekri_precmd {
function prompt_damoekri_setup {
setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst)
prompt_opts=(cr percent sp subst)
# Load required functions.
autoload -Uz add-zsh-hook