From b4e6726ae2fe61500d164e9282ac90f25f7099a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sun, 13 Mar 2016 15:32:57 +0100 Subject: [PATCH] Change ZSH config sourcing. --- zsh/zsh/{shellopts.sh => 10_shellopts.sh} | 0 zsh/zsh/{functions.sh => 20_functions.sh} | 0 zsh/zsh/{variables.sh => 30_variables.sh} | 0 zsh/zsh/{aliases.sh => 40_aliases.sh} | 2 ++ zsh/zsh/{prompt.sh => 50_prompt.sh} | 0 zsh/zshrc | 14 ++++---------- 6 files changed, 6 insertions(+), 10 deletions(-) rename zsh/zsh/{shellopts.sh => 10_shellopts.sh} (100%) rename zsh/zsh/{functions.sh => 20_functions.sh} (100%) rename zsh/zsh/{variables.sh => 30_variables.sh} (100%) rename zsh/zsh/{aliases.sh => 40_aliases.sh} (94%) rename zsh/zsh/{prompt.sh => 50_prompt.sh} (100%) diff --git a/zsh/zsh/shellopts.sh b/zsh/zsh/10_shellopts.sh similarity index 100% rename from zsh/zsh/shellopts.sh rename to zsh/zsh/10_shellopts.sh diff --git a/zsh/zsh/functions.sh b/zsh/zsh/20_functions.sh similarity index 100% rename from zsh/zsh/functions.sh rename to zsh/zsh/20_functions.sh diff --git a/zsh/zsh/variables.sh b/zsh/zsh/30_variables.sh similarity index 100% rename from zsh/zsh/variables.sh rename to zsh/zsh/30_variables.sh diff --git a/zsh/zsh/aliases.sh b/zsh/zsh/40_aliases.sh similarity index 94% rename from zsh/zsh/aliases.sh rename to zsh/zsh/40_aliases.sh index 501af04..bd16fad 100644 --- a/zsh/zsh/aliases.sh +++ b/zsh/zsh/40_aliases.sh @@ -60,3 +60,5 @@ alias l="ls" alias s="sudo" alias t="tmux" alias cl="clear" + +alias nocolor="sed -r \"s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g\"" diff --git a/zsh/zsh/prompt.sh b/zsh/zsh/50_prompt.sh similarity index 100% rename from zsh/zsh/prompt.sh rename to zsh/zsh/50_prompt.sh diff --git a/zsh/zshrc b/zsh/zshrc index d632dca..f6c871b 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,15 +1,9 @@ [[ -z "$PS1" ]] && return -_files=( - 'shellopts' - 'functions' - 'variables' - 'aliases' - 'prompt') +_zshdir="$HOME/.zsh" -for file in "${_files[@]}" ; do - _path="$HOME"/.zsh/"$file".sh - if [[ -e "$_path" ]] ; then - source "$_path" +for file in "${_zshdir}"/* ; do + if [[ -e "$file" ]] ; then + source "$file" fi done