RESOLVED FIXED Bug 83690
webkit-tools-completion: Support bugzilla email completion for webkit-patch upload --cc
https://bugs.webkit.org/show_bug.cgi?id=83690
Summary webkit-tools-completion: Support bugzilla email completion for webkit-patch u...
Jocelyn Turcotte
Reported 2012-04-11 07:32:26 PDT
webkit-tools-completion: Support bugzilla email completion for webkit-patch upload --cc
Attachments
Patch (2.75 KB, patch)
2012-04-11 07:35 PDT, Jocelyn Turcotte
no flags
Patch (2.75 KB, patch)
2012-04-12 05:11 PDT, Jocelyn Turcotte
vestbo: review+
Jocelyn Turcotte
Comment 1 2012-04-11 07:35:28 PDT
Jocelyn Turcotte
Comment 2 2012-04-12 05:11:49 PDT
Created attachment 136880 [details] Patch - Use print() instead of print_ - Use COMP_WORDS directly in __webkit-patch_upload_cc_generate_reply like __webkit-patch_generate_reply does
Tor Arne Vestbø
Comment 3 2012-04-13 04:59:30 PDT
Comment on attachment 136880 [details] Patch lgtm, minus the comment thing
Jocelyn Turcotte
Comment 4 2012-04-13 06:02:26 PDT
Csaba Osztrogonác
Comment 5 2012-04-13 06:17:19 PDT
The title of the bug and the committ log is incorrect, because it only completes options, not email addresses now. Otherwise the idea is very good, email competion in bash is cool. ;)
Jocelyn Turcotte
Comment 6 2012-04-13 06:42:00 PDT
(In reply to comment #5) Well it should, so if it doesn't then it's broken in some cases. Did you try to re- source Tools/Scripts/webkit-tools-completion.sh ?
Csaba Osztrogonác
Comment 7 2012-04-16 02:57:04 PDT
(In reply to comment #6) > (In reply to comment #5) > Well it should, so if it doesn't then it's broken in some cases. > Did you try to re- source Tools/Scripts/webkit-tools-completion.sh ? I made some digging, and there were two problems here: - I copied this script to /etc/bash_completion.d to make it system wide, but unfortunaly it doesn't work, because the search path of committers.py is relative to webkit-tools-completion.sh. - I thought that completion works similar to cc field on bugzilla and I tried to use it with real names and nicknames. But it seems it understands only email addressess.
Jocelyn Turcotte
Comment 8 2012-04-16 04:26:31 PDT
(In reply to comment #7) > I made some digging, and there were two problems here: > - I copied this script to /etc/bash_completion.d to make it system wide, > but unfortunaly it doesn't work, because the search path of committers.py > is relative to webkit-tools-completion.sh. Ah ok, do you know if many people use it that way? Using an environment variable to point to committers.py would be pretty crappy, but maybe it would be possible to extract the path from the first token in $COMP_WORDS. What I mean is to try finding committers.py relatively to webkit-patch instead of webkit-tools-completion.sh. > - I thought that completion works similar to cc field on bugzilla and I > tried to use it with real names and nicknames. But it seems it understands > only email addressess. I talked with Tor Arne about it too but bash haven't designed their completion extension to make this work reliably. It works better with completing than replacing text. So from my point of view it's better to keep it limited and reliable.
Note You need to log in before you can comment on or make changes to this bug.