patch-m_muttalias_sh_in 1.2 KB

12345678910111213141516171819
  1. $OpenBSD: patch-m_muttalias_sh_in,v 1.4 2014/09/16 12:15:23 sthen Exp $
  2. --- m_muttalias.sh.in.orig Thu Jun 11 11:56:22 2009
  3. +++ m_muttalias.sh.in Tue Sep 16 13:04:48 2014
  4. @@ -34,10 +34,10 @@ m_muttalias_query()
  5. if [ -f "$file" ]
  6. then
  7. grep -ia "$@" $file \
  8. - | grep -a '^alias[ ][ ]*[^,][^,]*[ ][ ]*\([^,]\|\\\".*\\\"\)*$' \
  9. - | sed -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*<\([^ >][^ >]*\)>[ ][ ]*(\([^<>()]*\))[^()<>]*$/\2 \3 alias \1/' \
  10. - -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*\(\\\".*\\\"[^<>()]*\|[^<>()]*\)<\([^<>()]*\)>[^<>]*$/\3 \2 alias \1/' \
  11. - -e 's/^alias[ ][ ]*\([^ ][^ ]*\)[ ][ ]*\([^<>()]*\)(\(\\\".*\\\"[^<>()]*\|[^<>()]*\))[^()<>]*$/\2 \3 alias \1/' \
  12. + | grep -Ea '^alias[ ][ ]*[^,][^,]*[ ][ ]*([^,]|\\\".*\\\")*$' \
  13. + | sed -E -e 's/^alias[ ][ ]*([^ ][^ ]*)[ ][ ]*<([^ >][^ >]*)>[ ][ ]*\(([^<>()]*)\)[^()<>]*$/\2 \3 alias \1/' \
  14. + -e 's/^alias[ ][ ]*([^ ][^ ]*)[ ][ ]*(\\\".*\\\"[^<>()]*|[^<>()]*)<([^<>()]*)>[^<>]*$/\3 \2 alias \1/' \
  15. + -e 's/^alias[ ][ ]*([^ ][^ ]*)[ ][ ]*([^<>()]*)\((\\\".*\\\"[^<>()]*|[^<>()]*)\)[^()<>]*$/\2 \3 alias \1/' \
  16. -e 's/\\\"//g' \
  17. | grep -va '^alias[ ][ ]*[^,][^,]*[ ][ ]*[^,]*$' || :
  18. fi