Re: Bash-5.2-alpha available

2022-01-22 Thread Oğuz
On Fri, Jan 21, 2022 at 6:28 PM Chet Ramey wrote: > a. Fixed a bug that assigned a value to the variable name supplied as an >argument to `wait -p' when there were no jobs. This doesn't seem like it's fixed $ bash -c 'echo $BASH_VERSION; unset foo; for i in 1 2 3; do wait -p foo; declare -p

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Andreas Kusalananda Kähäri
On Fri, Jan 21, 2022 at 06:33:02PM -0500, Chet Ramey wrote: > On 1/21/22 6:13 PM, Mike Jonkmans wrote: > > On Fri, Jan 21, 2022 at 03:29:47PM -0500, Chet Ramey wrote: > > > On 1/21/22 1:43 AM, Lawrence Velázquez wrote: > > > > > > > Personally, I would be > > > > less than pleased if my whole term

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Andreas Schwab
On Jan 21 2022, Lawrence Velázquez wrote: > Depends what you consider to be an issue. Personally, I would be > less than pleased if my whole terminal turned red just because I > changed into a directory that happened to have a weird name. Put $(tput sgr0) in PS1. -- Andreas Schwab, sch...@linu

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Koichi Murase
2022年1月22日(土) 19:54 Andreas Kusalananda Kähäri : > [...] > > Highly unlikely. It would require an implausible scenario. > > Mind if I use that quote? :-) > > Example of interesting values to test in PS1, with discussions: > > https://security.stackexchange.com/q/56307 These cases discussed

Re: Bash-5.2-alpha available

2022-01-22 Thread Andreas Schwab
bash --posix -c 'read -t1

Re: Bash-5.2-alpha available

2022-01-22 Thread Chet Ramey
On 1/22/22 4:09 AM, Oğuz wrote: On Fri, Jan 21, 2022 at 6:28 PM Chet Ramey wrote: a. Fixed a bug that assigned a value to the variable name supplied as an argument to `wait -p' when there were no jobs. This doesn't seem like it's fixed $ bash -c 'echo $BASH_VERSION; unset foo; for i in 1

Re: Bash-5.2-alpha available

2022-01-22 Thread Chet Ramey
On 1/22/22 10:01 AM, Andreas Schwab wrote: bash --posix -c 'read -t1 Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Lawrence Velázquez
On Sat, Jan 22, 2022, at 5:57 AM, Andreas Schwab wrote: > On Jan 21 2022, Lawrence Velázquez wrote: > >> Depends what you consider to be an issue. Personally, I would be >> less than pleased if my whole terminal turned red just because I >> changed into a directory that happened to have a weird na

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Chet Ramey
On 1/22/22 5:52 AM, Andreas Kusalananda Kähäri wrote: On Fri, Jan 21, 2022 at 06:33:02PM -0500, Chet Ramey wrote: On 1/21/22 6:13 PM, Mike Jonkmans wrote: On Fri, Jan 21, 2022 at 03:29:47PM -0500, Chet Ramey wrote: On 1/21/22 1:43 AM, Lawrence Velázquez wrote: Personally, I would be less tha

Re: Bash-5.2-alpha available

2022-01-22 Thread Oğuz
22 Ocak 2022 Cumartesi tarihinde Chet Ramey yazdı: > > $'\n' is identical to > ' > ' > > Here-document bodies are parsed as if they are within double quotes, and > single quotes are not special within double quotes. > Okay, it kinda makes sense. But what is the point of allowing dollar-quotes ins

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Lawrence Velázquez
On Fri, Jan 21, 2022, at 3:29 PM, Chet Ramey wrote: > On 1/21/22 1:43 AM, Lawrence Velázquez wrote: > >> Personally, I would be >> less than pleased if my whole terminal turned red just because I >> changed into a directory that happened to have a weird name. > > A mild annoyance at best, don't you

Re: Bash-5.2-alpha available

2022-01-22 Thread Chet Ramey
On 1/22/22 1:31 PM, Oğuz wrote: 22 Ocak 2022 Cumartesi tarihinde Chet Ramey > yazdı: $'\n' is identical to ' ' Here-document bodies are parsed as if they are within double quotes, and single quotes are not special within double quotes. Okay, it

Re: Bash-5.2-alpha available

2022-01-22 Thread Chet Ramey
On 1/22/22 1:52 PM, Oğuz wrote: 22 Ocak 2022 Cumartesi tarihinde Chet Ramey > yazdı: Because they should behave identically to other forms of quoting that bash handles in here-documents. Why should $'' be different from '' only within here-document bodies?

Re: Bash-5.2-alpha available

2022-01-22 Thread Oğuz
22 Ocak 2022 Cumartesi tarihinde Chet Ramey yazdı: > > Because they should behave identically to other forms of quoting that bash > handles in here-documents. Why should $'' be different from '' only within > here-document bodies? Because it'd be useless otherwise. Why would anyone use $'' in a

Re: Bash-5.2-alpha available

2022-01-22 Thread Sam James
> On 22 Jan 2022, at 18:52, Oğuz wrote: > 22 Ocak 2022 Cumartesi tarihinde Chet Ramey yazdı: >> Because they should behave identically to other forms of quoting that bash >> handles in here-documents. Why should $'' be different from '' only within >> here-document bodies? > Because it'd be use

Re: Bash-5.2-alpha available

2022-01-22 Thread Andreas Schwab
On Jan 22 2022, Chet Ramey wrote: > Because they should behave identically to other forms of quoting that bash > handles in here-documents. Why should $'' be different from '' only within > here-document bodies? $'' is left as-is inside double quotes, why should it treated differently in here-doc

Re: Bash-5.2-alpha available

2022-01-22 Thread Chet Ramey
On 1/22/22 2:24 PM, Sam James wrote: On 22 Jan 2022, at 18:52, Oğuz wrote: 22 Ocak 2022 Cumartesi tarihinde Chet Ramey yazdı: Because they should behave identically to other forms of quoting that bash handles in here-documents. Why should $'' be different from '' only within here-document b

Re: Bash-5.2-alpha available

2022-01-22 Thread Chet Ramey
On 1/22/22 2:51 PM, Andreas Schwab wrote: On Jan 22 2022, Chet Ramey wrote: Because they should behave identically to other forms of quoting that bash handles in here-documents. Why should $'' be different from '' only within here-document bodies? $'' is left as-is inside double quotes, why s

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Andreas Kusalananda Kähäri
On Sat, Jan 22, 2022 at 01:28:50PM -0500, Chet Ramey wrote: > On 1/22/22 5:52 AM, Andreas Kusalananda Kähäri wrote: > > On Fri, Jan 21, 2022 at 06:33:02PM -0500, Chet Ramey wrote: > > > On 1/21/22 6:13 PM, Mike Jonkmans wrote: > > > > On Fri, Jan 21, 2022 at 03:29:47PM -0500, Chet Ramey wrote: > >

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread L A Walsh
On 2022/01/20 22:20, Lawrence Velázquez wrote: On Fri, Jan 21, 2022, at 12:22 AM, L A Walsh wrote: On 2022/01/18 22:31, Alex fxmbsw7 Ratchev wrote Fix: [sanitizing the prompt]. Sanitizing? What's that? Especially in a way that won't break existing legal usages? Curiou

Re: Bash not escaping escape sequences in directory names

2022-01-22 Thread Lawrence Velázquez
On Sat, Jan 22, 2022, at 6:10 PM, L A Walsh wrote: > So I would ask which user-controlled prompts are "illegal" such that > they would be sanitized? I guess you're concerned with "(along with other user-controlled substitutions in the prompt)". I'm not entirely sure what the OP meant by that, an