diff options
author | Case Duckworth | 2022-03-13 05:36:53 +0000 |
---|---|---|
committer | Case Duckworth | 2022-03-13 05:36:53 +0000 |
commit | dcb05f00e1ad6083d6a9aa0590440b5b9ef37ec1 (patch) | |
tree | bace9d6677fc4462ef91c5901e24c078e736253b /bash | |
parent | Change prompt (diff) | |
download | etc-dcb05f00e1ad6083d6a9aa0590440b5b9ef37ec1.tar.gz etc-dcb05f00e1ad6083d6a9aa0590440b5b9ef37ec1.zip |
Whitespace and formatting
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/bash/bashrc b/bash/bashrc index 854fe7e..e167fee 100644 --- a/bash/bashrc +++ b/bash/bashrc | |||
@@ -14,28 +14,41 @@ BASH_SOURCE_LAST=( | |||
14 | 14 | ||
15 | for f in "${BASH_SOURCE_FIRST[@]}"; do | 15 | for f in "${BASH_SOURCE_FIRST[@]}"; do |
16 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" | 16 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" |
17 | [[ -r "$file" ]] && source "$file" # || echo >&2 "no '$file' found" | 17 | if [[ -r "$file" ]]; then |
18 | # echo >&2 "Sourcing '$file'" | ||
19 | source "$file" | ||
20 | else | ||
21 | : | ||
22 | # echo >&2 "No '$file' found" | ||
23 | fi | ||
18 | done | 24 | done |
19 | 25 | ||
20 | for file in "$XDG_CONFIG_HOME"/bash/*.bash; do | 26 | for file in "$XDG_CONFIG_HOME"/bash/*.bash; do |
21 | file_base="${file##*/}" | 27 | file_base="${file##*/}" |
22 | memq "${file_base%.bash}" "${BASH_SOURCE_FIRST[@]}" && { | 28 | if memq "${file_base%.bash}" "${BASH_SOURCE_FIRST[@]}"; then |
23 | # echo >&2 "'$file' in BASH_SOURCE_FIRST, skipping" | 29 | # echo >&2 "'$file' in BASH_SOURCE_FIRST, skipping" |
24 | continue | 30 | continue |
25 | } | 31 | elif memq "${file_base%.bash}" "${BASH_SOURCE_LAST[@]}"; then |
26 | memq "${file_base%.bash}" "${BASH_SOURCE_LAST[@]}" && { | ||
27 | # echo >&2 "'$file' in BASH_SOURCE_LAST, skipping" | 32 | # echo >&2 "'$file' in BASH_SOURCE_LAST, skipping" |
28 | continue | 33 | continue |
29 | } | 34 | elif [[ -r "$file" ]]; then |
30 | [[ -r "$file" ]] && { | ||
31 | # echo >&2 "Sourcing '$file'" | 35 | # echo >&2 "Sourcing '$file'" |
32 | source "$file" | 36 | source "$file" |
33 | } | 37 | else |
38 | : | ||
39 | # echo >&2 "No '$file' found" | ||
40 | fi | ||
34 | unset file_base | 41 | unset file_base |
35 | done | 42 | done |
36 | 43 | ||
37 | for f in "${BASH_SOURCE_LAST[@]}"; do | 44 | for f in "${BASH_SOURCE_LAST[@]}"; do |
38 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" | 45 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" |
39 | [[ -r "$file" ]] && source "$file" # || echo >&2 "no '$file' found" | 46 | if [[ -r "$file" ]]; then |
40 | true | 47 | source "$file" |
48 | else | ||
49 | : | ||
50 | #echo >&2 "No '$file' found" | ||
51 | fi | ||
41 | done | 52 | done |
53 | |||
54 | true | ||