diff --git a/bash/bashrc.d/init.d/path.sh b/bash/bashrc.d/init.d/path.sh new file mode 100755 index 00000000..74d20f1d --- /dev/null +++ b/bash/bashrc.d/init.d/path.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +export "PATH=${PATH}:${HOME}/.local/bin:${HOME}/.local/share/flatpak/exports/bin:${HOME}/.cargo/bin" diff --git a/bash/bashrc.d/startup.sh b/bash/bashrc.d/startup.sh index 0a383056..dcaf8484 100755 --- a/bash/bashrc.d/startup.sh +++ b/bash/bashrc.d/startup.sh @@ -6,8 +6,14 @@ cd "${HOME:?}/.bashrc.d" || ( exit 1 ) +# Initialize basic stuff +[[ -f "init.d/path.sh" ]] && source "init.d/path.sh" +[[ -f "init.d/variables.sh" ]] && source "init.d/variables.sh" +[[ -f "init.d/aliases.sh" ]] && source "init.d/aliases.sh" +[[ -f "init.d/functions.sh" ]] && source "init.d/functions.sh" + # Create new configuration file -[[ ! -f "config.sh" ]] && cat << EOF >> config.sh +[[ ! -f "config.sh" ]] && $(which cat) << EOF >> config.sh #!/usr/bin/env bash CONFIG_FLOW_CONTROL=0 CONFIG_AUTOSAVE_HISTORY=1 @@ -20,11 +26,6 @@ EOF # Load configuration file source "config.sh" -# Initialize basic stuff -[[ -f "init.d/variables.sh" ]] && source "init.d/variables.sh" -[[ -f "init.d/aliases.sh" ]] && source "init.d/aliases.sh" -[[ -f "init.d/functions.sh" ]] && source "init.d/functions.sh" - # Process configuration changes # -> Flow control [[ "${CONFIG_FLOW_CONTROl}" == "0" ]] && stty -ixon