From: martin f. krafft Date: Fri, 9 May 2008 13:27:10 +0000 (+0100) Subject: properly handle absent aliases files X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/5089b3ee80379f6a88a14fb4c091d02c244a9cbd?hp=--cc;pf=etc properly handle absent aliases files --- 5089b3ee80379f6a88a14fb4c091d02c244a9cbd diff --git a/.mutt/muttrc b/.mutt/muttrc index 35915bc..84260b1 100644 --- a/.mutt/muttrc +++ b/.mutt/muttrc @@ -4444,7 +4444,5 @@ source $my_confdir/hooks set my_mailboxes = `ls ~/.var/offlineimap/mailboxes 2>/dev/null || echo /dev/null` source $my_mailboxes -# this sucks a bit since we hardcode ~/.mutt instead of using $my_confdir, but -# apparently we can't expand that mutt variable for the subshell... -set alias_file = `ls ~/.mutt/aliases 2>/dev/null || echo /dev/null` -source $alias_file +set alias_file="$my_confdir/aliases" +source "test -f $alias_file && cat $alias_file || echo unset alias_file|"