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

Michael Gliwinski Michael.Gliwinski at henderson-group.com
Wed Nov 11 10:16:35 GMT 2009


On Saturday 07 November 2009 18:29:16 John Arbash Meinel wrote:
> 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
> =:->

John, I for one, agree with you.  Although I try to keep as far away from 
Windows as I can, when I'm occasionally forced to work on it I would 
appreciate bzr supporting sane quoting.

Maybe making it optional is indeed the way to go?  I'm wondering though, how 
many users would actually consider such behaviour surprising?  It doesn't 
seem that different to default behaviour to me.

-- 
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319

**********************************************************************************************
The information in this email is confidential and may be legally privileged.  It is intended solely for the addressee and access to the email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed  in the governing client engagement leter or contract.
If you have received this email in error please notify support at henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************




More information about the bazaar mailing list