Change the order of the completion, e.g. based on the extension or size of the entry #642
Unanswered
tobiasBora
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Those things are already possible.
You can tell Zsh's completion system to hide files matching a certain pattern, unless you type something that matches only those files: zstyle ':completion:*files' ignored-patterns '*.'{aux,bbl,pdf,run.xml,synctext.gz} '*-pratend' Read
That depends on the value of I find that this gives good sorting results on Linux export LC_COLLATE=C.UTF-8 whereas on macOS, I get better results with export LANG=en_US.UTF-8 Read IBM's article Understanding locale environment variables for more info. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What do you want?
Would it be possible to allow the user to change the order of the suggested completion, or even to move some item in a "less important" section? E.g. in:
I’d prefer to have:
.tex
files appear first, before the .pdf (these are the "important extensions" I care about)hey.tex
andhey-backup.tex
orhey-pratend-foo.tex
, I would prefer to have the shorter files listed first: sometimes, I can even type the full name, and the file is listed at the very end of the line, making it hard to select:(not that these screenshots are taken with a relatively old version (~1y) so things might have changed a bit now, but I see nothing in the doc about that anyway)
Why do you want this?
In LaTeX, you get an enormous amount of temporary files created during compilation, and most of the time only the
.tex
file and the.pdf
files are important. Sometimes, some.tex
files are also created with the same prefix but with an additional part in the name (the-pratend
in the screenshot). This means that completion of these kind of files is very hard, and it is often easier to type the full name manually.Who else would benefit from this?
People that care about some extensions more than others, so at least any LaTeX user.
How should it work?
The user should provide in configuration something like:
When I perform the following steps:
Then I expect the following to happen:
Beta Was this translation helpful? Give feedback.
All reactions