summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-03-31 15:33:45 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-03-31 15:33:45 -0400
commit8b30d99552fb97614a63895c385907e5dbbcb852 (patch)
treeb81e6983e426cffd6cdaf58a73f0a9d7c908ef09
parent5929cd30254b26ed886fab508904c48d1b687a1e (diff)
get available accounts from muttrcs
-rwxr-xr-xmw2
1 files changed, 1 insertions, 1 deletions
diff --git a/mw b/mw
index 6d2534a..ff3f4fc 100755
--- a/mw
+++ b/mw
@@ -294,7 +294,7 @@ wipe () { \
}
pick() { \
- numbered="$(grep "^accounts *=" "$HOME/.config/offlineimap/config" | sed 's/accounts *= *//g;s/,/ /g;s/ \+/\n/g' | nl)"
+ numbered="$(ls $accdir/*muttrc | sed "s/.*\///;s/\..*//" | nl)"
[ "$(echo "$numbered" | wc -w)" = 0 ] && printf "No accounts to delete.\\n" && return 1
printf "Select an accounts to %s:\\n" "$1"
echo "$numbered"