mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 05:53:06 +00:00
fix(shell): add missing hostname to config loaders
This commit is contained in:
@@ -7,12 +7,13 @@ export DOTFILES="$HOME/.dotfiles"
|
|||||||
# Run x-load-configs in your terminal to reload the files.
|
# Run x-load-configs in your terminal to reload the files.
|
||||||
function x-load-configs()
|
function x-load-configs()
|
||||||
{
|
{
|
||||||
|
HOST="$(hostname -s)"
|
||||||
# Load the shell dotfiles, and then some:
|
# Load the shell dotfiles, and then some:
|
||||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
[ -r "$file" ] && source "$file"
|
[ -r "$file" ] && source "$file"
|
||||||
[ -r "$file-secret" ] && source "$file-secret"
|
[ -r "$file-secret" ] && source "$file-secret"
|
||||||
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
[ -r "$file-$HOST" ] && source "$file-$HOST"
|
||||||
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
x-load-configs
|
x-load-configs
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ export DOTFILES="$HOME/.dotfiles"
|
|||||||
# Run x-load-configs in your terminal to reload the files.
|
# Run x-load-configs in your terminal to reload the files.
|
||||||
function x-load-configs()
|
function x-load-configs()
|
||||||
{
|
{
|
||||||
# Load the shell dotfiles, and then some:
|
HOST="$(hostname -s)"
|
||||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
# Load the shell dotfiles, and then some:
|
||||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
[ -r "$file" ] && source "$file"
|
||||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
[ -r "$file-secret" ] && source "$file-secret"
|
||||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
[ -r "$file-$HOST" ] && source "$file-$HOST"
|
||||||
done
|
[ -r "$file-$HOST-secret" ] && source "$file-$HOST-secret"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
x-load-configs
|
x-load-configs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user