From 414e67347cfc8e5e1bd21177b09e8213bc813a8f Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Thu, 7 Nov 2019 07:17:26 -0500 Subject: [PATCH] fish: use a function for getting autoexec dirs --- applications/fish | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/applications/fish b/applications/fish index 993359e..dc04f4a 100644 --- a/applications/fish +++ b/applications/fish @@ -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