Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

71%
+3 −0
Q&A Case independent tab completion in zsh shell

zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands. autoload -Uz...

posted 2y ago by elgonzo‭  ·  edited 2y ago by elgonzo‭

Answer
#5: Post edited by user avatar elgonzo‭ · 2022-02-16T13:59:02Z (about 2 years ago)
Update about future zsh versions containing a patched latex completion function including dtx file extension
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dtx files will not be suggested for latex.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore[^3]. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
  • [^3]: By convention, only completion function files starting with an underscore are autoloaded. (https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Autoloaded-files)
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dtx files will not be suggested for latex.
  • <BR>
  • _Update: As per [this comment](https://powerusers.codidact.com/comments/thread/5920#comment-16659), future versions of zsh will include the dtx file extension in the file name pattern for the latex completion function, thus the solutions/workarounds described below shouldn't be necessary anymore with respect to future zsh releases/updates._
  • <BR>
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore[^3]. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
  • [^3]: By convention, only completion function files starting with an underscore are autoloaded. (https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Autoloaded-files)
#4: Post edited by user avatar elgonzo‭ · 2022-02-14T10:54:12Z (about 2 years ago)
Added a little more context to the underscore completion function file name convention
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dtx files will not be suggested for latex.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dtx files will not be suggested for latex.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore[^3]. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
  • [^3]: By convention, only completion function files starting with an underscore are autoloaded. (https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Autoloaded-files)
#3: Post edited by user avatar elgonzo‭ · 2022-02-14T07:39:11Z (about 2 years ago)
Minor file extension confusion
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dfx files will not be suggested for latex.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dtx files will not be suggested for latex.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
#2: Post edited by user avatar elgonzo‭ · 2022-02-13T19:11:23Z (about 2 years ago)
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • And unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
  • zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.
  • `autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].
  • One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.
  • Unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`, and thus dfx files will not be suggested for latex.
  • As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.
  • [^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
  • [^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex
#1: Initial revision by user avatar elgonzo‭ · 2022-02-13T19:09:17Z (about 2 years ago)
zsh comes with a number of completion function files for popular programs and commands that govern how completions and suggestions are executed in relation to these programs/commands.

`autoload -Uz compinit && compinit` is basically just a way to load and initialize these completion functions[^1].

One feature of such completion function is the ability to constrain file suggestions for the respective program/command based on file name patterns, so as to not suggest files that the respective program/command won't be able to consume.

And unfortunately, the completion function for latex[^2] is missing the dtx file extension in its file name pattern `*.(tex|TEX|texinfo|texi)(-.)`.

As samcarter themselves found out ([link to comment](https://powerusers.codidact.com/comments/thread/5874#comment-16511)), for making zsh suggest all files for latex, it is sufficient to remove the entry for the latex completion function from the "_.zcompdump_" file. Alternatively, the latex completion function file ("_\_tex_") might be removed from the directory with the completion function files, or renamed to a file name that does _not_ start with an underscore. It has to be seen, though, whether such measures will survive a possible future update of the zsh installation.


[^1]: _compinit_ in the zsh documentation: https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Use-of-compinit
[^2]: Source in zsh's git repository:https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_tex