( )⚙ D4428 zsh_completion: complete shelve and unshelve

This is an archive of the discontinued Mercurial Phabricator instance.

zsh_completion: complete shelve and unshelve
ClosedPublic

Authored by av6 on Aug 31 2018, 1:42 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

av6 created this revision.Aug 31 2018, 1:42 AM

(Not marking accepted, though I'm fine with it going in as is, so that we get a chance to answer the questions before it lands)

contrib/zsh_completion
1272

Mine has a --cleanup flag. Not sure where that came from, and I think it's dangerous as heck and I don't like it, but ... should we list it? (I'm 100% fine with the answer being "no, it's too scary" :))

1277

Optional: should we make --delete exclusive with anything else? what about --list, patch, stat..?

av6 added inline comments.Aug 31 2018, 9:22 PM
contrib/zsh_completion
1272

I don't think it's too scary, but I do think it's too stealthy.

1277

I gave up on that idea. The logic in hgext.shelve.shelvecmd() is more or less clear, but translated into zsh completions it takes too much space: it would mean that many flags would mention almost every other flag, and --cleanup would mention literally all of them. But not global flags, mind, so you can't shortcut with (-).

I'd like to see some clever way to translate allowables and the related code into zsh instead, but I myself can't write that kind of zsh yet.

av6 updated this revision to Diff 10717.Sep 3 2018, 6:52 AM
av6 added a comment.Sep 3 2018, 7:01 AM

Ah, and now the comments are grayed out. I shouldn't have re-phabsend-ed this, since there are no changes from the previous version.

spectral accepted this revision.Sep 4 2018, 4:31 PM
pulkit accepted this revision.Sep 5 2018, 6:39 AM
This revision was automatically updated to reflect the committed changes.