This is an archive of the discontinued Mercurial Phabricator instance.

zsh_completion: drop -w, add -S to _arguments
ClosedPublic

Authored by av6 on Aug 11 2018, 12:09 AM.

Details

Summary

From the docs: http://zsh.sourceforge.net/Doc/Release/Completion-System.html

_arguments -w: "allow option stacking even if one or more of the options take
arguments", so something like "-xy xarg yarg". Mercurial's command line parser
doesn't support that, so the flag got removed in zsh 92584634d3d3 and
bf8b61182043.

_arguments -S: "do not complete options after a ‘--’ appearing on the line". By
options it means things like "-x" and "--foo", but it will still complete
arguments like files.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

av6 created this revision.Aug 11 2018, 12:09 AM
av6 added a comment.EditedAug 11 2018, 12:15 AM

Thanks, and , for making it difficult to phabsend this. I had to

diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -117,6 +117,8 @@ def urlencodenested(params):
     def process(prefix, obj):
         items = {list: enumerate, dict: lambda x: x.items()}.get(type(obj))
         if items is None:
+            if isinstance(obj, unicode):
+                obj = obj.encode('utf-8')
             flatparams[prefix] = obj
         else:
             for k, v in items(obj):

But having word diff for this series makes up for the frustration, I think.

spectral accepted this revision.Aug 13 2018, 2:29 PM
In D4262#65777, @av6 wrote:

Thanks, and , for making it difficult to phabsend this. I had to

diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -117,6 +117,8 @@ def urlencodenested(params):
     def process(prefix, obj):
         items = {list: enumerate, dict: lambda x: x.items()}.get(type(obj))
         if items is None:
+            if isinstance(obj, unicode):
+                obj = obj.encode('utf-8')
             flatparams[prefix] = obj
         else:
             for k, v in items(obj):

But having word diff for this series makes up for the frustration, I think.

Can you send that patch too (maybe you already have, just not to phabricator... I don't generally follow mercurial-devel@)? I've also encountered unicode issues with phabsend, but didn't have the time or ability to track it down and just removed the unicode from my commit description :)

This revision was automatically updated to reflect the committed changes.