[MERGE] alias to respect spaces in quoted arguments

Marius Kruger amanic at gmail.com
Fri Oct 20 13:47:53 BST 2006


Hi,
I had a bzr problem which I annoyed me so much that I went ahead and fixed
it:)
My problem WAS:

   - I descovered aliases and wanted to use them for everything.
   - I instaled the lessdiff plugin, (which for some reason displays ^M
   characters on linux allthough my normal diff|less doesn't)
   - I though not a problem I'll just alias some more diff-options:
   `diff = lessdiff -r -2..-1 --diff-options "--strip-trailing-cr -wp"`
   - This should have worked since `lessdiff -r -2..-1 --diff-options
   "--strip-trailing-cr -wp` works fine for me.
   - After some investigation I realized that it breaks because
   get_alias(cmd)  [in commands.py]  does a alias.split(' ') which causes
   it to think that my argument list is [u'--diff-options',
   u'"--strip-trailing-cr', u'-wp"'].  As you can see it split up my quoted
   text in the middle.
   - So I made a fix for it (with my limited python skills).

I hope this is acceptable and that it does not influence other use cases
which I might be un aware of.


regards
marius



--
bzr stands for 'bzr iz not git' :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20061020/2122bd21/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alias_quotes.patch
Type: application/octet-stream
Size: 1178 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061020/2122bd21/attachment.obj 


More information about the bazaar mailing list