bash-completion for xelatex

Posted by andreas-h on Ask Ubuntu See other posts from Ask Ubuntu or by andreas-h
Published on 2012-11-29T17:11:01Z Indexed on 2012/11/29 17:18 UTC
Read the original article Hit count: 369

Filed under:

I'm on Ubuntu 12.04. When using bash as my shell, I can just type

latex my_do <TAB>

to compile a file my_document.tex, as *bash_completion* does the auto-complete. However, this auto-completion does not work for the xelatex executable. So I would like to add the same auto-complete functionality for xelatex as exists for latex. I could find that the latex auto-complete feature comes from the file /etc/bash_completion, where I could find a line

complete -f -X '!*.@(?(la)tex|texi|dtx|ins|ltx)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi

Now I could of course just add xelatex to that line and everything is fine. However, I'm wondering if I could instead put a file in /etc/bash_completion.d, as this would leave the system file untouched. Unfortunately, I'm at a complete loss about the syntax -- but maybe someone can help me here?

© Ask Ubuntu or respective owner

Related posts about bash