diff options
author | Case Duckworth | 2022-04-13 17:20:13 -0500 |
---|---|---|
committer | Case Duckworth | 2022-04-13 17:20:13 -0500 |
commit | 34d6372186b79a9b1004884152ec022fa43ef81d (patch) | |
tree | 6b3248a12d35c7aa06959fa5e226055756f32f8b /bash/bashrc | |
parent | Emacs stuff (diff) | |
parent | Remove apk from sudo aliases (diff) | |
download | etc-34d6372186b79a9b1004884152ec022fa43ef81d.tar.gz etc-34d6372186b79a9b1004884152ec022fa43ef81d.zip |
Merge branch 'main' of github.com:duckwork/etc
Diffstat (limited to 'bash/bashrc')
-rw-r--r-- | bash/bashrc | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/bash/bashrc b/bash/bashrc index a1bfade..f9f17e7 100644 --- a/bash/bashrc +++ b/bash/bashrc | |||
@@ -15,28 +15,41 @@ BASH_SOURCE_LAST=( | |||
15 | 15 | ||
16 | for f in "${BASH_SOURCE_FIRST[@]}"; do | 16 | for f in "${BASH_SOURCE_FIRST[@]}"; do |
17 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" | 17 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" |
18 | [[ -r "$file" ]] && source "$file" # || echo >&2 "no '$file' found" | 18 | if [[ -r "$file" ]]; then |
19 | # echo >&2 "Sourcing '$file'" | ||
20 | source "$file" | ||
21 | else | ||
22 | : | ||
23 | # echo >&2 "No '$file' found" | ||
24 | fi | ||
19 | done | 25 | done |
20 | 26 | ||
21 | for file in "$XDG_CONFIG_HOME"/bash/*.bash; do | 27 | for file in "$XDG_CONFIG_HOME"/bash/*.bash; do |
22 | file_base="${file##*/}" | 28 | file_base="${file##*/}" |
23 | memq "${file_base%.bash}" "${BASH_SOURCE_FIRST[@]}" && { | 29 | if memq "${file_base%.bash}" "${BASH_SOURCE_FIRST[@]}"; then |
24 | # echo >&2 "'$file' in BASH_SOURCE_FIRST, skipping" | 30 | # echo >&2 "'$file' in BASH_SOURCE_FIRST, skipping" |
25 | continue | 31 | continue |
26 | } | 32 | elif memq "${file_base%.bash}" "${BASH_SOURCE_LAST[@]}"; then |
27 | memq "${file_base%.bash}" "${BASH_SOURCE_LAST[@]}" && { | ||
28 | # echo >&2 "'$file' in BASH_SOURCE_LAST, skipping" | 33 | # echo >&2 "'$file' in BASH_SOURCE_LAST, skipping" |
29 | continue | 34 | continue |
30 | } | 35 | elif [[ -r "$file" ]]; then |
31 | [[ -r "$file" ]] && { | ||
32 | # echo >&2 "Sourcing '$file'" | 36 | # echo >&2 "Sourcing '$file'" |
33 | source "$file" | 37 | source "$file" |
34 | } | 38 | else |
39 | : | ||
40 | # echo >&2 "No '$file' found" | ||
41 | fi | ||
35 | unset file_base | 42 | unset file_base |
36 | done | 43 | done |
37 | 44 | ||
38 | for f in "${BASH_SOURCE_LAST[@]}"; do | 45 | for f in "${BASH_SOURCE_LAST[@]}"; do |
39 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" | 46 | file="${XDG_CONFIG_HOME:-$HOME/.config}/bash/$f.bash" |
40 | [[ -r "$file" ]] && source "$file" # || echo >&2 "no '$file' found" | 47 | if [[ -r "$file" ]]; then |
41 | true | 48 | source "$file" |
49 | else | ||
50 | : | ||
51 | #echo >&2 "No '$file' found" | ||
52 | fi | ||
42 | done | 53 | done |
54 | |||
55 | true | ||