Re: [PATCH] print regerror string on regcomp error

2023-07-17 Thread Chet Ramey
On 7/17/23 1:10 PM, Grisha Levit wrote: On Mon, Jul 17, 2023, 12:09 Chet Ramey > wrote: I guess we'll see how much the text of regerror(3) error messages varies across regexp implementations. Is that a concern? The GNU strings [1] are translated and even t

Re: [PATCH] print regerror string on regcomp error

2023-07-17 Thread Grisha Levit
On Mon, Jul 17, 2023, 12:09 Chet Ramey wrote: > I guess we'll see how much the text of regerror(3) > error messages varies across regexp implementations. > Is that a concern? The GNU strings [1] are translated and even their untranslated text does differ from that of the BSD ones [2]. The set o

Re: [PATCH] print regerror string on regcomp error

2023-07-17 Thread Chet Ramey
On 7/12/23 12:01 PM, Grisha Levit wrote: Since bash-5.3 now shows an error message when a regular expression can't be compiled, I thought it might be useful to add the regerror()-supplied string that provides more specifics on the failure, so we can get messages like: $ [[ x =~ [z-a] ]] bash: [[

[PATCH] print regerror string on regcomp error

2023-07-12 Thread Grisha Levit
Since bash-5.3 now shows an error message when a regular expression can't be compiled, I thought it might be useful to add the regerror()-supplied string that provides more specifics on the failure, so we can get messages like: $ [[ x =~ [z-a] ]] bash: [[: invalid regular expression `[z-a]': inval