Jonathan Nieder writes:
> Junio C Hamano wrote:
> ...
>> I am a bit reluctant to name the helper "sane_echo" to declare "echo
>> that interprets backslashes in the string is insane", though. For
>> these "print a single line" uses, we are only interested in using a
>> subset of the features offe
Junio C Hamano wrote:
> Jonathan Nieder writes:
>> We currently use "echo" all over the place (e.g., 'echo "$path"' in
>> git-sh-setup), and every time we fix it there is a chance of making
>> mistakes. I wonder if it would make sense to add a helper to make the
>> echo calls easier to replace:
David Kastrup writes:
> Junio C Hamano writes:
>
>> Jonathan Nieder writes:
>>
>>> Junio C Hamano wrote:
> Uwe Storbeck wrote:
>>>
>> +printf '%s\n' "$@" | sed -e 's/^/# /'
This is wrong, isn't it? Why do we want one line per item here?
>>>
>>> Yes, Hannes caught
Jonathan Nieder writes:
> Junio C Hamano wrote:
>>> Uwe Storbeck wrote:
>
+ printf '%s\n' "$@" | sed -e 's/^/# /'
>>
>> This is wrong, isn't it? Why do we want one line per item here?
>
> Yes, Hannes caught the same, too. Sorry for the sloppiness.
>
> We currently use "echo" all over
Junio C Hamano writes:
> Jonathan Nieder writes:
>
>> Junio C Hamano wrote:
Uwe Storbeck wrote:
>>
> + printf '%s\n' "$@" | sed -e 's/^/# /'
>>>
>>> This is wrong, isn't it? Why do we want one line per item here?
>>
>> Yes, Hannes caught the same, too. Sorry for the sloppiness.
>
Junio C Hamano wrote:
>> Uwe Storbeck wrote:
>>> + printf '%s\n' "$@" | sed -e 's/^/# /'
>
> This is wrong, isn't it? Why do we want one line per item here?
Yes, Hannes caught the same, too. Sorry for the sloppiness.
We currently use "echo" all over the place (e.g., 'echo "$path"' in
gi
Jonathan Nieder writes:
> Uwe Storbeck wrote:
>
>> Backslash sequences are interpreted as control characters
>> by the echo command of some shells (e.g. dash).
>
> This has bothered me for a while but never enough to do anything about
> it. Thanks for fixing it.
>
>> Signed-off-by: Uwe Storbeck
On Mar 15, Johannes Sixt wrote:
> > - echo "$@" | sed -e 's/^/# /'
> > + printf '%s\n' "$@" | sed -e 's/^/# /'
>
> This should be
>
> printf '%s\n' "$*" | sed -e 's/^/# /'
Right, that should be $* to always be one argument for the format
pattern.
Thanks
Uwe
--
To unsu
Am 15.03.2014 00:57, schrieb Uwe Storbeck:
> when variables may contain backslash sequences.
>
> Backslash sequences are interpreted as control characters
> by the echo command of some shells (e.g. dash).
>
> Signed-off-by: Uwe Storbeck
> ---
> t/test-lib.sh | 4 ++--
> 1 file changed, 2 insert
Uwe Storbeck wrote:
> Backslash sequences are interpreted as control characters
> by the echo command of some shells (e.g. dash).
This has bothered me for a while but never enough to do anything about
it. Thanks for fixing it.
> Signed-off-by: Uwe Storbeck
Reviewed-by: Jonathan Nieder
(patc
when variables may contain backslash sequences.
Backslash sequences are interpreted as control characters
by the echo command of some shells (e.g. dash).
Signed-off-by: Uwe Storbeck
---
t/test-lib.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/test-lib.sh b/t/test-
11 matches
Mail list logo