mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-30 18:46:45 +00:00
38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
# this is my bashrc config. there are many like it, but this one is mine.
|
|
# shellcheck shell=bash
|
|
|
|
# Defaults
|
|
export DOTFILES="$HOME/.dotfiles"
|
|
export DOTFILES_SHARED_LOADED=""
|
|
# shellcheck source=scripts/shared.sh
|
|
source "$DOTFILES/scripts/shared.sh"
|
|
|
|
# Run x-load-configs in your terminal to reload the files.
|
|
function x-load-configs()
|
|
{
|
|
# Load the shell dotfiles, and then some:
|
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
|
HOST="$(hostname -s)"
|
|
# global (exports|alias|functions) file for all hosts
|
|
# shellcheck source=../config/exports
|
|
[ -r "$file" ] && source "$file"
|
|
# global secret file, git ignored
|
|
# shellcheck source=../config/exports-secret
|
|
[ -r "$file-secret" ] && source "$file-secret"
|
|
# host specific (exports|alias|functions) file
|
|
# shellcheck source=../config/exports
|
|
[ -r "$file-$HOST" ] && source "$file-$HOST"
|
|
# host specific (exports|alias|functions) file, git ignored
|
|
# shellcheck source=../config/exports
|
|
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
|
done
|
|
}
|
|
x-load-configs
|
|
|
|
# Import ssh keys in keychain
|
|
ssh-add -A 2> /dev/null
|
|
|
|
# shellcheck source=../config/fzf/fzf.bash
|
|
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] \
|
|
&& source "${DOTFILES}/config/fzf/fzf.bash"
|