commit d7a14b687ab2496f09c7cd4627f63e792170df8d
parent 420dfe6b056b3a22edf6425d63789e9156d5b9a7
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sat, 17 Feb 2024 20:42:30 +0530
Fix /sh/aliases: not found issue
Check for jq in call script
Check for XDG_ROOT in .basrc
Diffstat:
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.bashrc b/.bashrc
@@ -1,3 +1,4 @@
+[ -z "$XDG_ROOT" ] && . ./.profile
[ -f "$XDG_CONFIG_HOME/sh/unstaged" ] && . "$XDG_CONFIG_HOME/sh/unstaged"
[ -f "$XDG_CONFIG_HOME/bash_unstaged" ] && . "$XDG_CONFIG_HOME/bash_unstaged"
. "${XDG_CONFIG_HOME}/sh/aliases"
diff --git a/.local/bin/bash/call b/.local/bin/bash/call
@@ -1,3 +1,4 @@
+command -v jq || exit 1
export TERMUX_CONTACTS_LIST="$(termux-contact-list)"
export CNA="$(echo "${TERMUX_CONTACTS_LIST}" | jq '.[] | .name' | fzf)"
diff --git a/.profile b/.profile
@@ -90,6 +90,5 @@ HISTTIMEFORMAT="%F %T "
HISTCONTROL=erasedups
. "${XDG_CONFIG_HOME}/sh/functions"
-. "${XDG_CONFIG_HOME}/sh/unstaged"
+[ -f "${XDG_CONFIG_HOME}/sh/unstaged" ] && . "${XDG_CONFIG_HOME}/sh/unstaged"
-[ -n "$BASH" ] && [ -f "$XDG_ROOT/.bashrc" ] && . "$XDG_ROOT/.bashrc"