-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix quoting of grep Regex in m_muttalias.
Required with grep >= 3.8, which complains about stray \ before " In the NEWS file for grep 3.8: Regular expressions with stray backslashes now cause warnings, as their unspecified behavior can lead to unexpected results.
- Loading branch information
1 parent
5db49a2
commit 2cae723
Showing
2 changed files
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# -*-sh-*- | ||
# | ||
# Copyright (C) 2000 Brian Salter-Duke <[email protected]> | ||
# 2000-2018 Roland Rosenfeld <[email protected]> | ||
# 2000-2022 Roland Rosenfeld <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -37,7 +37,7 @@ m_muttalias_query() | |
# 2. alias nick [email protected] (Foo Bar) | ||
# 3. alias nick <[email protected]> (Foo Bar) | ||
grep -ia "$@" "$file" \ | ||
| grep -a '^alias[ ][ ]*[^,][^,]*[ ][ ]*\([^,]\|\\\".*\\\"\)*$' \ | ||
| grep -a '^alias[ ][ ]*[^,][^,]*[ ][ ]*\([^,]\|".*"\)*$' \ | ||
| sed -E -e 's/^alias[[:blank:]]+([^[:blank:]]+)[[:blank:]]+("[^"]+"|[^<>()]+)[[:blank:]]+<([^<>()]+)>.*$/\3 \2 alias \1/' \ | ||
-e 's/^alias[[:blank:]]+([^[:blank:]]+)[[:blank:]]+([^<>()]+)[[:blank:]]+\(([^()<>]+)\).*$/\2 \3 alias \1/' \ | ||
-e 's/^alias[[:blank:]]+([^[:blank:]]+)[[:blank:]]+<([^<>()]+)>[[:blank:]]+\(([^()<>]+)\).*$/\2 \3 alias \1/' \ | ||
|