Don't use single quotes as quotes in command-line parsing on windows?

John Arbash Meinel john at arbash-meinel.com
Sat Nov 7 18:29:16 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Philippe Lhoste wrote:
> On 07/11/2009 17:19, John Arbash Meinel wrote:
>> I certainly remember other people transitioning to bzr (back where I
>> worked before I was hired by Canonical), and trying to do:
>>
>>  bzr commit -m 'this is some text'
>>
>> was very confusing for them that it would fail with:
>>
>>   No such file: is
> 
> While this quoting style is usual (or mandatory) on Unix, it is not used
> at all on Windows.
> And in commit message, preserving single quote meaning as apostrophe is
> even more important... :-)

And:
  bzr commit -m "foo and it's done"

works just fine.

  bzr commi t-m 'foo and it's done'

doesn't, but that is because of using ' as the initial quote.

> 
>> I honestly feel that the number of files that will be versioned which
>> have an ' in them is very low. Mabye I'm wrong, but I'd like actual
>> evidence for that fact.
> 
> Perhaps my case is exceptional, but for better or worse, I took the
> habit to drag'n'drop the icon of the address bar of Firefox to an
> Articles folder which is under Bazaar management (articles related to a
> programming language I use).
> This has for effect to create an URL link (.URL file) which can be
> double-clicked to open the address in the current default browser.
> The advantage over Firefox bookmarks is they are grouped with stuff I do
> in this language, I can synch it on two computers...
> 
> Well, you can see yourself such directory:
> http://bazaar.launchpad.net/~philho/%2Bjunk/JavaFX/files/head%3A/Articles/
> 
> Note: such created file names are adapted to Windows constraints, so >
> are replaced with », / with nothing, etc. We end up with some Unicode
> characters in filenames, which is problematic when we do bzr log, as
> reported in another thread.
> 
> Another use case can be Word documents: by default, Word creates a name
> using the first sentence, which can have apostrophes.
> Or a folder named "80's Song Lyrics", etc.
> 
> After all, we (well, I) keep to say VCSes should be used beyond the
> strict boundaries of source code management... :-)
> 
>> Anyway, Alexander's patch looks fine for removing '' quoting. *I* prefer
>> '' quoting so I'm not going to vote approve. However, if the consensus
>> is that I'm wrong, then I can certainly be overridden.
> 
> A possible solution is to leave that choice to the user...
> I would default to " for quoting (on Windows), but allow to use ' with
> some configuration setting.
> 

So they "still work", just that you would have to be slightly more
careful with them then you would have had to in the past. "bzr add"
still grabs everything, "bzr add *.url" will grab them, etc.

I probably need to allow escaping the characters, so you can do:

 bzr add 80\'s_stuff

However

 bzr add "80's Song Lyrics"

also still 'just works'.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr1vHwACgkQJdeBCYSNAAOVUQCgn4wZbmgnkL/EAJRUUHJuGjcz
Fc0AoJxrq79CUKA0YuipYmFKwpIFX1+k
=y1I7
-----END PGP SIGNATURE-----



More information about the bazaar mailing list