From 4be2e71e4aef88fdeef4f6ece63b4ef32155cb7f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 4 Oct 2017 01:59:22 +0300 Subject: don't source files twice --- %HOME%/.bash_utils/git.sh | 2 -- %HOME%/.bash_utils/path.sh | 2 -- %HOME%/.bash_utils/python.sh | 2 -- %HOME%/.bash_utils/ruby.sh | 2 -- %HOME%/.bashrc | 16 +++++++++------- 5 files changed, 9 insertions(+), 15 deletions(-) (limited to '%HOME%') diff --git a/%HOME%/.bash_utils/git.sh b/%HOME%/.bash_utils/git.sh index a9d4721..acf7ff8 100644 --- a/%HOME%/.bash_utils/git.sh +++ b/%HOME%/.bash_utils/git.sh @@ -5,8 +5,6 @@ # For details, see https://github.com/egor-tensin/cygwin-home. # Distributed under the MIT License. -source "$HOME/.bash_utils/text.sh" - alias branch_files='git ls-tree -r --name-only HEAD' alias branch_dirs='git ls-tree -r --name-only HEAD -d' diff --git a/%HOME%/.bash_utils/path.sh b/%HOME%/.bash_utils/path.sh index 9f1fdd4..efcc73a 100644 --- a/%HOME%/.bash_utils/path.sh +++ b/%HOME%/.bash_utils/path.sh @@ -5,8 +5,6 @@ # For details, see https://github.com/egor-tensin/cygwin-home. # Distributed under the MIT License. -source "$HOME/.bash_utils/text.sh" - path_add() ( set -o errexit -o nounset -o pipefail diff --git a/%HOME%/.bash_utils/python.sh b/%HOME%/.bash_utils/python.sh index 9193535..910fbdd 100644 --- a/%HOME%/.bash_utils/python.sh +++ b/%HOME%/.bash_utils/python.sh @@ -8,8 +8,6 @@ # This is a half-assed way to automatically add your user's pip binary # directory to $PATH. -source "$HOME/.bash_utils/path.sh" - python_setup_() ( set -o errexit -o nounset -o pipefail diff --git a/%HOME%/.bash_utils/ruby.sh b/%HOME%/.bash_utils/ruby.sh index abcd9b7..e9f5e3e 100644 --- a/%HOME%/.bash_utils/ruby.sh +++ b/%HOME%/.bash_utils/ruby.sh @@ -5,8 +5,6 @@ # For details, see https://github.com/egor-tensin/cygwin-home. # Distributed under the MIT License. -source "$HOME/.bash_utils/path.sh" - ruby_setup() { local user_dir local bin_dir diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 9d177d5..9745838 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -43,15 +43,17 @@ alias ssh-copy-id='ssh-copy-id -i' alias cls='echo -en "\ec"' alias copy='xclip -sel clip' -[ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" -[ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh" -[ -r "$HOME/.bash_utils/file.sh" ] && source "$HOME/.bash_utils/file.sh" -[ -r "$HOME/.bash_utils/git.sh" ] && source "$HOME/.bash_utils/git.sh" -[ -r "$HOME/.bash_utils/os.sh" ] && source "$HOME/.bash_utils/os.sh" -[ -r "$HOME/.bash_utils/path.sh" ] && source "$HOME/.bash_utils/path.sh" +[ -r "$HOME/.bash_utils/file.sh" ] && source "$HOME/.bash_utils/file.sh" +[ -r "$HOME/.bash_utils/text.sh" ] && source "$HOME/.bash_utils/text.sh" + +[ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" +[ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh" +[ -r "$HOME/.bash_utils/git.sh" ] && source "$HOME/.bash_utils/git.sh" +[ -r "$HOME/.bash_utils/os.sh" ] && source "$HOME/.bash_utils/os.sh" +[ -r "$HOME/.bash_utils/path.sh" ] && source "$HOME/.bash_utils/path.sh" + [ -r "$HOME/.bash_utils/python.sh" ] && source "$HOME/.bash_utils/python.sh" [ -r "$HOME/.bash_utils/ruby.sh" ] && source "$HOME/.bash_utils/ruby.sh" -[ -r "$HOME/.bash_utils/text.sh" ] && source "$HOME/.bash_utils/text.sh" [ -r "$HOME/.bash_aliases" ] && source "$HOME/.bash_aliases" -- cgit v1.2.3