Re: [PATCH] completion: suppress unwanted unescaping of `read`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Koichi Murase wrote:
> From: Edwin Kofler <edwin@xxxxxxxxxx>
> 
> The function `__git_eread`, which reads the first line from the file,
> calls the `read` builtin without passing the flag option `-r`.  When
> the `read` builtin is called without the flag `-r`, it processes the
> backslash escaping in the text that it reads.  For this reason, it is
> generally considered the best practice to always use the `read`
> builtin with flag `-r` unless one intensionally processes the
> backslash escaping.  For the present case in git-prompt.sh, in fact,
> all the occurrences of the calls of `__git_eread` intend to read the
> literal content of the first lines.

This is my undrstanding.

I agree using `-r` is a good practice.

> To make it read the first line literally, pass the flag `-r` to the
> `read` builtin in the function `__git_eread`.
> 
> Signed-off-by: Edwin Kofler <edwin@xxxxxxxxxx>
> Signed-off-by: Koichi Murase <myoga.murase@xxxxxxxxx>

Acked-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>

-- 
Felipe Contreras



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux