Skip to content

Commit

Permalink
main: fix a bug that "~/.config/blesh/init.sh" is not detected (GitHub
Browse files Browse the repository at this point in the history
…#53 by rux616)

* Check the correct variable for rcfile existence
* README: mention XDG_CONFIG_HOME for ~/.config/blesh/init.sh

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
  • Loading branch information
rux616 and akinomyoga committed May 11, 2020
1 parent 1bc1ff6 commit 9f74da6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ble.pp
Expand Up @@ -753,8 +753,8 @@ function ble/base/process-blesh-arguments {
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; [[ -f $_ble_base_rcfile ]]; } ||
{ _ble_base_rcfile=${XDG_CONFIG_HOME:-$HOME/.config}/blesh/init.sh; [[ -f $_ble_base_rcfile ]]; } ||
_ble_base_rcfile=$HOME/.blerc
fi
[[ -s $_ble_base_rcfile ]] && source "$_ble_base_rcfile"
Expand Down

0 comments on commit 9f74da6

Please sign in to comment.