I have a shell pattern that marks some files as "boring" namely backup files, pyo
files, vim backups, autogenerated directories and the like. Let's call it $BORING_STUFF
.
zstyle ':completion:*' file-patterns \
'%p:globbed-items' \
'*(^-/):regular-files' \
'*(^-/):boring-files' \
'.*(^-/):hidden-files' \
'*(-/):regular-directories' \
'*(-/):boring-directories' \
'.*(-/):hidden-directories'
In this case, I have the scope of each group also constrained by applicable ignore-patterns
. (Such that boring-files
contains only boring files and regular-files
does not contain boring files)
I'd like bold items to always show up, and other items only show up if there are no other matches. (Aka. touch <tab>
will show regular directories and regular files but not hidden files, while touch .<tab>
will show hidden files.)
- globbed items
- directories
- regular directories
- boring directories
- hidden directories
- files
- regular files
- boring files
- hidden files