mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Add support in profiles plugin for directories
The profiles plugin currently has support to load a single "profile" file for each component in the FQDN. This changeset makes it so the plugin supports the filename actually being a directory with multiple *.zsh files in it. Each of those files are then loaded in alphabetical order
This commit is contained in:
parent
306e3e7ea0
commit
08beed0853
1 changed files with 5 additions and 1 deletions
|
|
@ -6,7 +6,11 @@ parts=(${(s:.:)HOST})
|
|||
for i in {${#parts}..1}; do
|
||||
profile=${(j:.:)${parts[$i,${#parts}]}}
|
||||
file=$ZSH_CUSTOM/profiles/$profile
|
||||
if [ -f $file ]; then
|
||||
if [ -d $file ]; then
|
||||
for config_file ($file/*.zsh(N)); do
|
||||
source $config_file
|
||||
done
|
||||
elif [ -f $file ]; then
|
||||
source $file
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue