Skip to content

Commit

Permalink
main: check "~/.config/blesh/init.sh"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jan 18, 2020
1 parent ce93c08 commit 8e1ae73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ble.pp
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ function ble/base/attach-from-PROMPT_COMMAND {
ble/util/joblist.check
}

: "${_ble_base_rcfile:=$HOME/.blerc}"
function ble/base/process-blesh-arguments {
local opt_attach=attach
local opt_rcfile=
Expand Down Expand Up @@ -736,6 +735,11 @@ function ble/base/process-blesh-arguments {
esac
done

if [[ ! $_ble_base_rcfile ]]; then
{ _ble_base_rcfile=$HOME/.blerc; [[ -f $rcfile ]]; } ||
{ _ble_base_rcfile=${XDG_CONFIG_HOME:-$HOME/.config}/blesh/init.sh; [[ -f $rcfile ]]; } ||
_ble_base_rcfile=$HOME/.blerc
fi
[[ -s $_ble_base_rcfile ]] && source "$_ble_base_rcfile"
case $opt_attach in
(attach) ble-attach ;;
Expand Down

0 comments on commit 8e1ae73

Please sign in to comment.