Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.83k stars 252 forks source link

Wrote a zsh completion #802

Open zchee opened 8 years ago

zchee commented 8 years ago

I wrote pure zsh completion(not bash completion wrapper) scripts for rdm and rc. rtags seems to only have bash completion, Is there a demand?

If there are demand, I will send pull request. but if there is no demand, or if difficult to maintain it, please ignore and close issue. Thanks.

screenshot 2016-09-22 00 10 16 screenshot 2016-09-22 00 11 01

RedBeard0531 commented 8 years ago

+1

Andersbakken commented 8 years ago

Looks awesome. We'd love to have it. Does it call rc/rdm --help to dynamically generate the help context or is it hardcoded?

Either way, we'd love to maintain it inside of rtags. Wanna file a PR?

Anders

On Wed, Sep 21, 2016 at 2:01 PM, Mathias Stearn notifications@github.com wrote:

+1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Andersbakken/rtags/issues/802#issuecomment-248741757, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEdSsJxhkF79jG1xYL1fSL9VBvN6995ks5qsZsggaJpZM4KC7ZW .

zchee commented 8 years ago

@Andersbakken Ah, sorry late reply. I'll comment about zsh completion script and my implements ways.

zchee commented 8 years ago

@Andersbakken Sorry for delay :( Here is sample(not finished) scripts. Currently, pubilshed under the BSD. will fix when pull request.(GNU?)

https://github.com/zchee/zsh-completions/blob/master/src/_rdm https://github.com/zchee/zsh-completions/blob/master/src/_rc

We'd love to have it. Does it call rc/rdm --help to dynamically generate the help context

Basically, zsh completion scripts are hardcoded. Like bash completion, sometimes there are parse version. such as cmake -D completion. But my scripts is hardcoded type, so might be difficult to maintain it.

If you want even in it, I will send pull request.

Andersbakken commented 8 years ago

Hi Koichi

BSD license is fine too.

We'll gladly take them. It would maybe be better if it was able to call rc/rdm --help and generate this dynamically but new options aren't really added that often so it should be okay.

Thanks

Anders

On Fri, Oct 7, 2016 at 2:55 AM, Koichi Shiraishi notifications@github.com wrote:

@Andersbakken https://github.com/Andersbakken Sorry for delay :( Here is sample(not finished) scripts. Currently, pubilshed under the BSD. will fix when pull request.(GNU?)

https://github.com/zchee/zsh-completions/blob/master/src/_rdm https://github.com/zchee/zsh-completions/blob/master/src/_rc

We'd love to have it. Does it call rc/rdm --help to dynamically generate the help context

Basically, zsh completion scripts are hardcoded. Like bash completion, sometimes there are parse script. such as cmake -D completion. But my scripts is hardcoded type, so might be difficult to maintain it.

If you want even in it, I will send pull request.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Andersbakken/rtags/issues/802#issuecomment-252201683, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEdSuIjRBntS6XFH-BD6-nTVEXBJFSxks5qxhb6gaJpZM4KC7ZW .

zchee commented 8 years ago

@Andersbakken Hi,

I got it. Currently, my script not supported argument completion. that's such as

rdm --data-dir ***
# in this case, display directory path completion at `***` with press tab

rc -c ***
# display `${CC} --help`(or etc) resutls flags completion

So, I will pull request after some fix.

Thanks.

Andersbakken commented 8 years ago

Sounds good. Thank you.

Anders

On Sun, Oct 9, 2016 at 11:05 AM, Koichi Shiraishi notifications@github.com wrote:

@Andersbakken https://github.com/Andersbakken Hi,

I got it. Currently, my script not supported argument completion. that's such as

rdm --data-dir _# in this case, display directory path completion at `_` with press tab

rc -c ***# display ${CC} --help(or etc) resutls flags completion

So, I will pull request after some fix.

Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Andersbakken/rtags/issues/802#issuecomment-252501983, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEdSm2k9NxK6m2F2mfUgDy3lfGkMZ1zks5qySzWgaJpZM4KC7ZW .

RedBeard0531 commented 6 years ago

@zchee did you ever get it working? I keep getting frustrated by zsh's builtin completion for a different rc program (probably plan9's shell?)

casch-at commented 6 years ago

@zchee Any updates on that?