Re: Stupid quoting...
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 13, 2007, 12:21 UTC
- Message-ID
- <Pine.LNX.4.64.0706131316390.4059@racer.site>
- In-Reply-To
- <86ir9sw0pi.fsf@lola.quinscape.zz>
Hi,
On Wed, 13 Jun 2007, David Kastrup wrote:
> what is the point in quoting file names and their characters in > git-diff's output? And what is the recommended way of undoing the > damage?
The recommended way is not using spaces to begin with. I mean, does "David" contain spaces? People seem not to see the problem, and fail to blame Microsoft for all the damage they have done, introducing that stupid, stupid concept of filenames containing spaces, and _enforcing_ it.
Show 12 quoted lines
> I have something like
>
> git-diff -M -C --name-status -r master^ master | {
> while read -r flag name
> do
> case "$name" in *\\[0-3][0-7][0-7]*)
> name=$(echo -e $(echo "$name"|sed 's/\\\([0-3][0-7][0-7]\)/\\0\1/g;s/\\\([^0]\)/\\\\\1/g'))
> esac
> [...]
>
> in order to get through the worst with utf-8 file names, and it is a
> complete nuisance (double quotemarks are treated later).Please understand that the quotes are not there for you, but for processing by other programs.
However, I _suspect_ that you want to do something like
name="$(echo $name)"
because "echo" is exactly one of the programs this quoting was invented for.
Ciao, Dscho