fish: use a function for getting autoexec dirs

master
an 2019-11-07 07:17:26 -05:00
parent f0d18e3d1b
commit 414e67347c
1 changed files with 8 additions and 5 deletions

View File

@ -31,11 +31,14 @@ if test -f ~/.cargo/env
source ~/.cargo/env
end
for f in (test -d $_agw_dir_local/fish &&
find $_agw_dir_local/fish -type f |
env LC_ALL=C sort) \
(find $_agw_dir_rc/fish -type f |
env LC_ALL=C sort)
function _agw_get_autoexec -d "Function for bootstrapping. Finds auto-execs."
if test -d $argv[1]
find $argv[1] -type f | env LC_ALL=C sort
end
end
for f in (_agw_get_autoexec $_agw_dir_local/fish) \
(_agw_get_autoexec $_agw_dir_rc/fish)
source $f
end