Hi, I just put together a simple completion script for texexec in zsh. Zsh can do some fancy completions with tab. I have written a completion script that gives some command line switches of texexec as part of tab completion in zsh. Here is what the output looks like http://wiki.contextgarden.net/Image:Screenshot-Terminal.png One can go between the different options by pressing tab. The script is at http://wiki.contextgarden.net/User:Adityam#Zsh_completion This is my first attempt to write a zsh completion script. Any feedback is welcome. Aditya
Dne ponedeljek 17. decembra 2007 je Aditya Mahajan napisal(a):
I just put together a simple completion script for texexec in zsh.
Sweet, thanks :]
This is my first attempt to write a zsh completion script. Any feedback is welcome.
Well, I'm a Zsh newbie, so I'm in no position to claim anything to be wrong. But what bothers me with your script (as it is right now) is that when apart from 'texexec' there is also a 'texexec_completer' command present. Otherwise, really great work! It inspired me to perhaps even take on some Zsh scripting of my own at some point. Cheers, Matija Šuklje -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
On Tue, 18 Dec 2007, Matija Šuklje wrote:
Dne ponedeljek 17. decembra 2007 je Aditya Mahajan napisal(a):
I just put together a simple completion script for texexec in zsh.
Sweet, thanks :]
This is my first attempt to write a zsh completion script. Any feedback is welcome.
Well, I'm a Zsh newbie,
So am I. Been using it for about two weeks now.
so I'm in no position to claim anything to be wrong. But what bothers me with your script (as it is right now) is that when apart from 'texexec' there is also a 'texexec_completer' command present.
Yes. All the completer functions are available as commands. Try _<tab> and you will see all the in-built ones. If you want, you can rename texexec_completer to _texexec. That way, you will not get prompted for it on normal commands. I do not know if _ is reservered for distribution level completers or not, so did not name it _texexec.
Otherwise, really great work! It inspired me to perhaps even take on some Zsh scripting of my own at some point.
I have been fairly impressed zsh tab completion. For example, suppose firefox has hung, and you want to kill it. Earlier, I did something like ps aux | grep firefox look at the pid and kill that process. With zsh, I can do kill -9 firefox<tab> and it finds the pid for me. Sweet. At some point, I hope to get a more sophisticated completer for texexec. Aditya
Dne torek 18. decembra 2007 je Aditya Mahajan napisal(a):
Yes. All the completer functions are available as commands. Try _<tab> and you will see all the in-built ones.
Thanks. Nice :]
If you want, you can rename texexec_completer to _texexec. That way, you will not get prompted for it on normal commands. I do not know if _ is reservered for distribution level completers or not, so did not name it _texexec.
Hmm, that would be a possibility. If I look at Gentoo's Portage autocompletion, they're all names like '_genlop', '_gentoolkit' etc. ...so IMHO '_texexec' would be quite acceptable. .
look at the pid and kill that process. With zsh, I can do
kill -9 firefox<tab> and it finds the pid for me. Sweet.
I didn't know about that one yet ...but Zsh *is* amazing. Not to mention how the documentation is overpowering. -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
participants (2)
-
Aditya Mahajan
-
Matija Šuklje