openbsd-ports/databases/lbdb/patches/patch-m_muttalias_sh_in

19 lines
1.2 KiB
Plaintext

$OpenBSD: patch-m_muttalias_sh_in,v 1.3 2009/08/07 19:43:36 naddy Exp $
--- m_muttalias.sh.in.orig Sun May 27 10:42:22 2007
+++ m_muttalias.sh.in Fri Aug 7 16:12:17 2009
@@ -34,10 +34,10 @@ m_muttalias_query()
if [ -f "$file" ]
then
grep -ia "$@" $file \
- | grep -a '^alias[ ][ ]*[^,][^,]*[ ][ ]*\([^,]\|\\\".*\\\"\)*$' \
- | sed -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*<\([^ >][^ >]*\)>[ ][ ]*(\([^<>()]*\))[^()<>]*$/\2 \3 alias \1/' \
- -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*\(\\\".*\\\"[^<>()]*\|[^<>()]*\)<\([^<>()]*\)>[^<>]*$/\3 \2 alias \1/' \
- -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*\([^<>()]*\)(\(\\\".*\\\"[^<>()]*\|[^<>()]*\))[^()<>]*$/\2 \3 alias \1/' \
+ | grep -Ea '^alias[ ][ ]*[^,][^,]*[ ][ ]*([^,]|\\\".*\\\")*$' \
+ | sed -E -e 's/^alias[ ][ ]*([^ ][^ ]*)[ ][ ]*<([^ >][^ >]*)>[ ][ ]*\(([^<>()]*)\)[^()<>]*$/\2 \3 alias \1/' \
+ -e 's/^alias[ ][ ]*([^ ][^ ]*)[ ][ ]*(\\\".*\\\"[^<>()]*|[^<>()]*)<([^<>()]*)>[^<>]*$/\3 \2 alias \1/' \
+ -e 's/^alias[ ][ ]*([^ ][^ ]*)[ ][ ]*([^<>()]*)\((\\\".*\\\"[^<>()]*|[^<>()]*)\)[^()<>]*$/\2 \3 alias \1/' \
-e 's/\\\"//g' \
| grep -va '^alias[ ][ ]*[^,][^,]*[ ][ ]*[^,]*$'
fi