From 780cd2eaff13129b8c713d0b6bc7cb6873a996aa Mon Sep 17 00:00:00 2001 From: rkiel Date: Sun, 22 Nov 2020 23:59:34 -0500 Subject: [PATCH] refactor: fixed zshrc --- dotfiles/zshrc | 14 ++++++++++++++ install/bin/setup | 22 ++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 5167f90..18dbd07 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -1,3 +1,17 @@ +GIT_UTILITIES_BIN=~/GitHub/rkiel/git-utilities/bin +export PATH=${GIT_UTILITIES_BIN}:$PATH + +export EDITOR=vim + +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +setopt prompt_subst +zstyle ':vcs_info:git:*' formats '%b' + +# generated by ./bin/generate-bash-prompt +export PS1='[%B%F{magenta}%n@%m%f%b %B%F{blue}%1d%f%b %B%F{green}'\$vcs_info_msg_0_'%f%b]$ ' + alias h='history' alias lsa='ls -la' alias lsl='ls -l' diff --git a/install/bin/setup b/install/bin/setup index 30b5ea1..33cbbab 100755 --- a/install/bin/setup +++ b/install/bin/setup @@ -7,20 +7,22 @@ GIT="~/GitHub/git/git" # ls|grep -v contrib|xargs rm -rf if [ "$2" == "zsh" ] ; then - FILE=~/.zprofile +# FILE=~/.zprofile +# echo >> $FILE +# if [ ! -z "$1" ] ; then +# echo "export FEATURE_USER=$1" >> $FILE +# fi +# echo "GIT_UTILITIES_BIN=${REPO}/bin" >> $FILE +# echo "export PATH=${GIT_UTILITIES_BIN}:$PATH" >> $FILE +# # echo "source ${REPO}/dotfiles/git-completion.zsh" >> $FILE +# # echo "source ${REPO}/dotfiles/git-prompt.sh" >> $FILE +# echo "source ${REPO}/dotfiles/zprofile" >> $FILE + + FILE=~/.zshrc echo >> $FILE if [ ! -z "$1" ] ; then echo "export FEATURE_USER=$1" >> $FILE fi - echo "GIT_UTILITIES_BIN=${REPO}/bin" >> $FILE - echo "export PATH=${GIT_UTILITIES_BIN}:$PATH" >> $FILE -# echo "source ${REPO}/dotfiles/git-completion.zsh" >> $FILE -# echo "source ${REPO}/dotfiles/git-prompt.sh" >> $FILE - echo "source ${REPO}/dotfiles/zprofile" >> $FILE - - - FILE=~/.zshrc - echo >> $FILE echo "source ${REPO}/dotfiles/zshrc" >> $FILE else FILE=~/.bash_profile