summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-04-22 13:11:27 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-04-22 13:11:27 -0400
commitf9bc254abda7d94bab9cc0d989226ba2d4884413 (patch)
treef0b8a789bf166a762396c5c22fe9802eac141855 /bin
parentc6dbd74f403f8d29ea3970fdb77658c528a0ae32 (diff)
list no extra space if empty
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mw2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mw b/bin/mw
index 8e7f22a..595f37b 100755
--- a/bin/mw
+++ b/bin/mw
@@ -13,7 +13,7 @@ mwconfig="$muttdir/mutt-wizard.muttrc"
muttrc="$muttdir/muttrc"
getaccounts() { accounts="$(find "$accdir" -type f | grep -o "[0-9]-.*.muttrc" | sed "s/-/: /g;s/\..*//" | sort -n)" ;}
-list() { getaccounts && echo "$accounts" ;}
+list() { getaccounts && [ -n "$accounts" ] && echo "$accounts" ;}
getprofiles() { \
unset msmtp_header msmtp_profile mutt_profile mbsync_profile