FS#75788 - [grml-zsh-config] grep 3.8-1 show error on zsh startup

Attached to Project: Arch Linux
Opened by Tobias Powalowski (tpowa) - Saturday, 03 September 2022, 19:48 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 08 September 2022, 11:45 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Pierre Schmitz (Pierre)
Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
LANG=en_US zsh
grep: warning: stray \ before 0

With latest grep I get this error on each zsh startup.
Downgrading grep to 3.7 and the error disappears.
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 08 September 2022, 11:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.19.3-2
Comment by loqs (loqs) - Sunday, 04 September 2022, 05:25 GMT
Intended change with grep 3.8 from [1]

Regular expressions with stray backslashes now cause warnings, as their unspecified behavior can lead to unexpected results. For example, '\a' and 'a' are not always equivalent <https://bugs.gnu.org/39678>. Similarly, regular expressions or subexpressions that start with a repetition operator now also cause warnings due to their unspecified behavior; for example, *a(+b|{1}c) now has three reasons to warn. The warnings are intended as a transition aid; they are likely to be errors in future releases.
Regular expressions like [:space:] are now errors even if POSIXLY_CORRECT is set, since POSIX now allows the GNU behavior.

[1] https://savannah.gnu.org/forum/forum.php?forum_id=10227
Comment by Doug Newgard (Scimmia) - Sunday, 04 September 2022, 05:41 GMT
Likely a grml-zsh-config issue.
Comment by loqs (loqs) - Sunday, 04 September 2022, 05:54 GMT
Very wild untested guess line 897 of /etc/zsh/zshrc from grml-zsh-config has a grep with \0 in the expression
[[ -r /etc/hosts ]] && [[ "$NOETCHOSTS" -eq 0 ]] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(grep -v '^0\.0\.0.\0\|^127\.0\.0\.1\|^::1 ' /etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
Comment by Sébastien Luttringer (seblu) - Sunday, 04 September 2022, 14:07 GMT
Not impacted with my own zsh configuration.
I can delay for a few days the move from [testing] until we figure have a patch into grml.
Comment by Doug Newgard (Scimmia) - Sunday, 04 September 2022, 14:25 GMT Comment by Siegfried Metz (NiceGuy) - Tuesday, 06 September 2022, 21:29 GMT
Thanks, loqs and Scimmia. That typo correction did the trick in the meanwhile.

Loading...