From 6eeb0b494b2623df32cebb2e6a0e20a457e21d57 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 13 Apr 2022 17:06:20 -0500 Subject: Add reprofile() --- profile/profile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/profile/profile b/profile/profile index 7a86c76..a0dc281 100644 --- a/profile/profile +++ b/profile/profile @@ -11,7 +11,17 @@ export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" # source files in $XDG_CONFIG_HOME/profile if [ -d "$XDG_CONFIG_HOME/profile" ]; then - for file in "$XDG_CONFIG_HOME"/profile/*.sh; do - [ -r "$file" ] && . "$file" - done + for file in "$XDG_CONFIG_HOME"/profile/*.sh; do + [ -r "$file" ] && . "$file" + done fi + +# refresh profile +reprofile() { + printf "Loading ~/.profile..." >&2 + if . "$HOME/.profile"; then + echo "OK." >&2 + else + echo "ERROR!" >&2 + fi +} -- cgit 1.4.1-21-gabe81