101 lines
17 KiB
Bash
101 lines
17 KiB
Bash
# ╭──────────────────────────────────────────────────────────╮
|
|
# │ Completion styling │
|
|
# ╰──────────────────────────────────────────────────────────╯
|
|
|
|
[[ -d ${XDG_CACHE_HOME:-$HOME/.cache}/zsh ]] || mkdir -p ${XDG_CACHE_HOME:-$HOME/.cache}/zsh
|
|
|
|
LS_COLORS='*~=0;38;2;91;96;120:bd=0;38;2;125;196;228;48;2;54;58;79:ca=0:cd=0;38;2;245;189;230;48;2;54;58;79:di=0;38;2;138;173;244:do=0;38;2;24;25;38;48;2;245;189;230:ex=1;38;2;237;135;150:fi=0:ln=0;38;2;245;189;230:mh=0:mi=0;38;2;24;25;38;48;2;237;135;150:no=0:or=0;38;2;24;25;38;48;2;237;135;150:ow=0:pi=0;38;2;24;25;38;48;2;138;173;244:rs=0:sg=0:so=0;38;2;24;25;38;48;2;245;189;230:st=0:su=0:tw=0:*.1=0;38;2;238;212;159:*.a=1;38;2;237;135;150:*.c=0;38;2;166;218;149:*.d=0;38;2;166;218;149:*.h=0;38;2;166;218;149:*.m=0;38;2;166;218;149:*.o=0;38;2;91;96;120:*.p=0;38;2;166;218;149:*.r=0;38;2;166;218;149:*.t=0;38;2;166;218;149:*.v=0;38;2;166;218;149:*.z=4;38;2;125;196;228:*.7z=4;38;2;125;196;228:*.ai=0;38;2;240;198;198:*.as=0;38;2;166;218;149:*.bc=0;38;2;91;96;120:*.bz=4;38;2;125;196;228:*.cc=0;38;2;166;218;149:*.cp=0;38;2;166;218;149:*.cr=0;38;2;166;218;149:*.cs=0;38;2;166;218;149:*.db=4;38;2;125;196;228:*.di=0;38;2;166;218;149:*.el=0;38;2;166;218;149:*.ex=0;38;2;166;218;149:*.fs=0;38;2;166;218;149:*.go=0;38;2;166;218;149:*.gv=0;38;2;166;218;149:*.gz=4;38;2;125;196;228:*.ha=0;38;2;166;218;149:*.hh=0;38;2;166;218;149:*.hi=0;38;2;91;96;120:*.hs=0;38;2;166;218;149:*.jl=0;38;2;166;218;149:*.js=0;38;2;166;218;149:*.ko=1;38;2;237;135;150:*.kt=0;38;2;166;218;149:*.la=0;38;2;91;96;120:*.ll=0;38;2;166;218;149:*.lo=0;38;2;91;96;120:*.ma=0;38;2;240;198;198:*.mb=0;38;2;240;198;198:*.md=0;38;2;238;212;159:*.mk=0;38;2;139;213;202:*.ml=0;38;2;166;218;149:*.mn=0;38;2;166;218;149:*.nb=0;38;2;166;218;149:*.nu=0;38;2;166;218;149:*.pl=0;38;2;166;218;149:*.pm=0;38;2;166;218;149:*.pp=0;38;2;166;218;149:*.ps=0;38;2;237;135;150:*.py=0;38;2;166;218;149:*.rb=0;38;2;166;218;149:*.rm=0;38;2;240;198;198:*.rs=0;38;2;166;218;149:*.sh=0;38;2;166;218;149:*.so=1;38;2;237;135;150:*.td=0;38;2;166;218;149:*.ts=0;38;2;166;218;149:*.ui=0;38;2;238;212;159:*.vb=0;38;2;166;218;149:*.wv=0;38;2;240;198;198:*.xz=4;38;2;125;196;228:*FAQ=0;38;2;36;39;58;48;2;238;212;159:*.3ds=0;38;2;240;198;198:*.3fr=0;38;2;240;198;198:*.3mf=0;38;2;240;198;198:*.adb=0;38;2;166;218;149:*.ads=0;38;2;166;218;149:*.aif=0;38;2;240;198;198:*.amf=0;38;2;240;198;198:*.ape=0;38;2;240;198;198:*.apk=4;38;2;125;196;228:*.ari=0;38;2;240;198;198:*.arj=4;38;2;125;196;228:*.arw=0;38;2;240;198;198:*.asa=0;38;2;166;218;149:*.asm=0;38;2;166;218;149:*.aux=0;38;2;91;96;120:*.avi=0;38;2;240;198;198:*.awk=0;38;2;166;218;149:*.bag=4;38;2;125;196;228:*.bak=0;38;2;91;96;120:*.bat=1;38;2;237;135;150:*.bay=0;38;2;240;198;198:*.bbl=0;38;2;91;96;120:*.bcf=0;38;2;91;96;120:*.bib=0;38;2;238;212;159:*.bin=4;38;2;125;196;228:*.blg=0;38;2;91;96;120:*.bmp=0;38;2;240;198;198:*.bsh=0;38;2;166;218;149:*.bst=0;38;2;238;212;159:*.bz2=4;38;2;125;196;228:*.c++=0;38;2;166;218;149:*.cap=0;38;2;240;198;198:*.cfg=0;38;2;238;212;159:*.cgi=0;38;2;166;218;149:*.clj=0;38;2;166;218;149:*.com=1;38;2;237;135;150:*.cpp=0;38;2;166;218;149:*.cr2=0;38;2;240;198;198:*.cr3=0;38;2;240;198;198:*.crw=0;38;2;240;198;198:*.css=0;38;2;166;218;149:*.csv=0;38;2;238;212;159:*.csx=0;38;2;166;218;149:*.cxx=0;38;2;166;218;149:*.dae=0;38;2;240;198;198:*.dcr=0;38;2;240;198;198:*.dcs=0;38;2;240;198;198:*.deb=4;38;2;125;196;228:*.def=0;38;2;166;218;149:*.dll=1;38;2;237;135;150:*.dmg=4;38;2;125;196;228:*.dng=0;38;2;240;198;198:*.doc=0;38;2;237;135;150:*.dot=0;38;2;166;218;149:*.dox=0;38;2;139;213;202:*.dpr=0;38;2;166;218;149:*.drf=0;38;2;240;198;198:*.dxf=0;38;2;240;198;198:*.eip=0;38;2;240;198;198:*.elc=0;38;2;166;218;149:*.elm=0;38;2;166;218;149:*.epp=0;38;2;166;218;149:*.eps=0;38;2;240;198;198:*.erf=0;38;2;240;198;198:*.erl=0;38;2;166;218;149:*.exe=1;38;2;237;135;150:*.exr=0;38;2;240;198;198:*.exs=0;38;2;166;218;149:*.fbx=0;38;2;240;198;198:*.fff=0;38;2;240;198;198:*.fls=0;38;2;91;96;120:*.flv=0;38;2;240;198;198:*.fnt=0;38;2;240;198;198:*.fon=0;38;2;240;198;198:*.fsi=0;38;2;166;218;149:*.fsx=0;38;2;166;218;149:*.gif=0;38;2;240;198;198:*.git=0;38;2;91;96;120:*.gpr=0;38;2;240;198;198:*.gvy=0;38;2;166;218;149:*.h++=0;38;2;166;218;149:*.hda=0;38;2;240;198;198:*.hip=0;38;2;240;198;198:*.hpp=0;38;2;166;218;149:*.htc=0;38;2;166;218;149:*.htm=0;38;2;238;212;159:*.hxx=0;38;2;166;218;149:*.ico=0;38;2;240;198;198:*.ics=0;38;2;237;135;150:*.idx=0;38;2;91;96;120:*.igs=0;38;2;240;198;198:*.iiq=0;38;2;240;198;198:*.ilg=0;38;2;91;96;120:*.img=4;38;2;125;196;228:*.inc=0;38;2;166;218;149:*.ind=0;38;2;91;96;120:*.ini=0;38;2;238;212;159:*.inl=0;38;2;166;218;149:*.ino=0;38;2;166;218;149:*.ipp=0;38;2;166;218;149:*.iso=4;38;2;125;196;228:*.jar=4;38;2;125;196;228:*.jpg=0;38;2;240;198;198:*.jsx=0;38;2;166;218;149:*.jxl=0;38;2;240;198;198:*.k25=0;38;2;240;198;198:*.kdc=0;38;2;240;198;198:*.kex=0;38;2;237;135;150:*.kra=0;38;2;240;198;198:*.kts=0;38;2;166;218;149:*.log=0;38;2;91;96;120:*.ltx=0;38;2;166;218;149:*.lua=0;38;2;166;218;149:*.m3u=0;38;2;240;198;198:*.m4a=0;38;2;240;198;198:*.m4v=0;38;2;240;198;198:*.mdc=0;38;2;240;198;198:*.mef=0;38;2;240;198;198:*.mid=0;38;2;240;198;198:*.mir=0;38;2;166;218;149:*.mkv=0;38;2;240;198;198:*.mli=0;38;2;166;218;149:*.mos=0;38;2;240;198;198:*.mov=0;38;2;240;198;198:*.mp3=0;38;2;240;198;198:*.mp4=0;38;2;240;198;198:*.mpg=0;38;2;240;198;198:*.mrw=0;38;2;240;198;198:*.msi=4;38;2;125;196;228:*.mtl=0;38;2;240;198;198:*.nef=0;38;2;240;198;198:*.nim=0;38;2;166;218;149:*.nix=0;38;2;238;212;159:*.nrw=0;38;2;240;198;198:*.obj=0;38;2;240;198;198:*.obm=0;38;2;240;198;198:*.odp=0;38;2;237;135;150:*.ods=0;38;2;237;135;150:*.odt=0;38;2;237;135;150:*.ogg=0;38;2;240;198;198:*.ogv=0;38;2;240;198;198:*.orf=0;38;2;240;198;198:*.org=0;38;2;238;212;159:*.otf=0;38;2;240;198;198:*.otl=0;38;2;240;198;198:*.out=0;38;2;91;96;120:*.pas=0;38;2;166;218;149:*.pbm=0;38;2;240;198;198:*.pcx=0;38;2;240;198;198:*.pdf=0;38;2;237;135;150:*.pef=0;38;2;240;198;198:*.pgm=0;38;2;240;198;198:*.php=0;38;2;166;218;149:*.pid=0;38;2;91;96;120:*.pkg=4;38;2;125;196;228:*.png=0;38;2;240;198;198:*.pod=0;38;2;166;218;149:*.ppm=0;38;2;240;198;198:*.pps=0;38;2;237;135;150:*.ppt=0;38;2;237;135;150:*.pro=0;38;2;139;213;202:*.ps1=0;38;2;166;218;149:*.psd=0;38;2;240;198;198:*.ptx=0;38;2;240;198;198:*.pxn=0;38;2;240;198;198:*.pyc=0;38;2;91;96;120:*.pyd=0;38;2;91;96;120:*.pyo=0;38;2;91;96;120:*.qoi=0;38;2;240;198;198:*.r3d=0;38;2;240;198;198:*.raf=0;38;2;240;198;198:*.rar=4;38;2;125;196;228:*.raw=0;38;2;240;198;198:*.rpm=4;38;2;125;196;228:*.rst=0;38;2;238;212;159:*.rtf=0;38;2;237;135;150:*.rw2=0;38;2;240;198;198:*.rwl=0;38;2;240;198;198:*.rwz=0;38;2;240;198;198:*.sbt=0;38;2;166;218;149:*.sql=0;38;2;166;218;149:*.sr2=0;38;2;240;198;198:*.srf=0;38;2;240;198;198:*.srw=0;38;2;240;198;198:*.stl=0;38;2;240;198;198:*.stp=0;38;2;240;198;198:*.sty=0;38;2;91;96;120:*.svg=0;38;2;240;198;198:*.swf=0;38;2;240;198;198:*.swp=0;38;2;91;96;120:*.sxi=0;38;2;237;135;150:*.sxw=0;38;2;237;135;150:*.tar=4;38;2;125;196;228:*.tbz=4;38;2;125;196;228:*.tcl=0;38;2;166;218;149:*.tex=0;38;2;166;218;149:*.tga=0;38;2;240;198;198:*.tgz=4;38;2;125;196;228:*.tif=0;38;2;240;198;198:*.tml=0;38;2;238;212;159:*.tmp=0;38;2;91;96;120:*.toc=0;38;2;91;96;120:*.tsx=0;38;2;166;218;149:*.ttf=0;38;2;240;198;198:*.txt=0;38;2;238;212;159:*.typ=0;38;2;238;212;159:*.usd=0;38;2;240;198;198:*.vcd=4;38;2;125;196;228:*.vim=0;38;2;166;218;149:*.vob=0;38;2;240;198;198:*.vsh=0;38;2;166;218;149:*.wav=0;38;2;240;198;198:*.wma=0;38;2;240;198;198:*.wmv=0;38;2;240;198;198:*.wrl=0;38;2;240;198;198:*.x3d=0;38;2;240;198;198:*.x3f=0;38;2;240;198;198:*.xlr=0;38;2;237;135;150:*.xls=0;38;2;237;135;150:*.xml=0;38;2;238;212;159:*.xmp=0;38;2;238;212;159:*.xpm=0;38;2;240;198;198:*.xvf=0;38;2;240;198;198:*.yml=0;38;2;238;212;159:*.zig=0;38;2;166;218;149:*.zip=4;38;2;125;196;228:*.zsh=0;38;2;166;218;149:*.zst=4;38;2;125;196;228:*TODO=1:*hgrc=0;38;2;139;213;202:*.avif=0;38;2;240;198;198:*.bash=0;38;2;166;218;149:*.braw=0;38;2;240;198;198:*.conf=0;38;2;238;212;159:*.dart=0;38;2;166;218;149:*.data=0;38;2;240;198;198:*.diff=0;38;2;166;218;149:*.docx=0;38;2;237;135;150:*.epub=0;38;2;237;135;150:*.fish=0;38;2;166;218;149:*.flac=0;38;2;240;198;198:*.h264=0;38;2;240;198;198:*.hack=0;38;2;166;218;149:*.heif=0;38;2;240;198;198:*.hgrc=0;38;2;139;213;202:*.html=0;38;2;238;212;159:*.iges=0;38;2;240;198;198:*.info=0;38;2;238;212;159:*.java=0;38;2;166;218;149:*.jpeg=0;38;2;240;198;198:*.json=0;38;2;238;212;159:*.less=0;38;2;166;218;149:*.lisp=0;38;2;166;218;149:*.lock=0;38;2;91;96;120:*.make=0;38;2;139;213;202:*.mojo=0;38;2;166;218;149:*.mpeg=0;38;2;240;198;198:*.nims=0;38;2;166;218;149:*.opus=0;38;2;240;198;198:*.orig=0;38;2;91;96;120:*.pptx=0;38;2;237;135;150:*.prql=0;38;2;166;218;149:*.psd1=0;38;2;166;218;149:*.psm1=0;38;2;166;218;149:*.purs=0;38;2;166;218;149:*.raku=0;38;2;166;218;149:*.rlib=0;38;2;91;96;120:*.sass=0;38;2;166;218;149:*.scad=0;38;2;166;218;149:*.scss=0;38;2;166;218;149:*.step=0;38;2;240;198;198:*.tbz2=4;38;2;125;196;228:*.tiff=0;38;2;240;198;198:*.toml=0;38;2;238;212;159:*.usda=0;38;2;240;198;198:*.usdc=0;38;2;240;198;198:*.usdz=0;38;2;240;198;198:*.webm=0;38;2;240;198;198:*.webp=0;38;2;240;198;198:*.woff=0;38;2;240;198;198:*.xbps=4;38;2;125;196;228:*.xlsx=0;38;2;237;135;150:*.yaml=0;38;2;238;212;159:*stdin=0;38;2;91;96;120:*v.mod=0;38;2;139;213;202:*.blend=0;38;2;240;198;198:*.cabal=0;38;2;166;218;149:*.cache=0;38;2;91;96;120:*.class=0;38;2;91;96;120:*.cmake=0;38;2;139;213;202:*.ctags=0;38;2;91;96;120:*.dylib=1;38;2;237;135;150:*.dyn_o=0;38;2;91;96;120:*.gcode=0;38;2;166;218;149:*.ipynb=0;38;2;166;218;149:*.mdown=0;38;2;238;212;159:*.patch=0;38;2;166;218;149:*.rmeta=0;38;2;91;96;120:*.scala=0;38;2;166;218;149:*.shtml=0;38;2;238;212;159:*.swift=0;38;2;166;218;149:*.toast=4;38;2;125;196;228:*.woff2=0;38;2;240;198;198:*.xhtml=0;38;2;238;212;159:*Icon\r=0;38;2;91;96;120:*LEGACY=0;38;2;36;39;58;48;2;238;212;159:*NOTICE=0;38;2;36;39;58;48;2;238;212;159:*README=0;38;2;36;39;58;48;2;238;212;159:*go.mod=0;38;2;139;213;202:*go.sum=0;38;2;91;96;120:*passwd=0;38;2;238;212;159:*shadow=0;38;2;238;212;159:*stderr=0;38;2;91;96;120:*stdout=0;38;2;91;96;120:*.bashrc=0;38;2;166;218;149:*.config=0;38;2;238;212;159:*.dyn_hi=0;38;2;91;96;120:*.flake8=0;38;2;139;213;202:*.gradle=0;38;2;166;218;149:*.groovy=0;38;2;166;218;149:*.ignore=0;38;2;139;213;202:*.matlab=0;38;2;166;218;149:*.nimble=0;38;2;166;218;149:*COPYING=0;38;2;147;154;183:*INSTALL=0;38;2;36;39;58;48;2;238;212;159:*LICENCE=0;38;2;147;154;183:*LICENSE=0;38;2;147;154;183:*TODO.md=1:*VERSION=0;38;2;36;39;58;48;2;238;212;159:*.alembic=0;38;2;240;198;198:*.desktop=0;38;2;238;212;159:*.gemspec=0;38;2;139;213;202:*.mailmap=0;38;2;139;213;202:*Doxyfile=0;38;2;139;213;202:*Makefile=0;38;2;139;213;202:*TODO.txt=1:*setup.py=0;38;2;139;213;202:*.DS_Store=0;38;2;91;96;120:*.cmake.in=0;38;2;139;213;202:*.fdignore=0;38;2;139;213;202:*.kdevelop=0;38;2;139;213;202:*.markdown=0;38;2;238;212;159:*.rgignore=0;38;2;139;213;202:*.tfignore=0;38;2;139;213;202:*CHANGELOG=0;38;2;36;39;58;48;2;238;212;159:*COPYRIGHT=0;38;2;147;154;183:*README.md=0;38;2;36;39;58;48;2;238;212;159:*bun.lockb=0;38;2;91;96;120:*configure=0;38;2;139;213;202:*.gitconfig=0;38;2;139;213;202:*.gitignore=0;38;2;139;213;202:*.localized=0;38;2;91;96;120:*.scons_opt=0;38;2;91;96;120:*.timestamp=0;38;2;91;96;120:*CODEOWNERS=0;38;2;139;213;202:*Dockerfile=0;38;2;238;212;159:*INSTALL.md=0;38;2;36;39;58;48;2;238;212;159:*README.txt=0;38;2;36;39;58;48;2;238;212;159:*SConscript=0;38;2;139;213;202:*SConstruct=0;38;2;139;213;202:*.cirrus.yml=0;38;2;166;218;149:*.gitmodules=0;38;2;139;213;202:*.synctex.gz=0;38;2;91;96;120:*.travis.yml=0;38;2;166;218;149:*INSTALL.txt=0;38;2;36;39;58;48;2;238;212;159:*LICENSE-MIT=0;38;2;147;154;183:*MANIFEST.in=0;38;2;139;213;202:*Makefile.am=0;38;2;139;213;202:*Makefile.in=0;38;2;91;96;120:*.applescript=0;38;2;166;218;149:*.fdb_latexmk=0;38;2;91;96;120:*.webmanifest=0;38;2;238;212;159:*CHANGELOG.md=0;38;2;36;39;58;48;2;238;212;159:*CONTRIBUTING=0;38;2;36;39;58;48;2;238;212;159:*CONTRIBUTORS=0;38;2;36;39;58;48;2;238;212;159:*appveyor.yml=0;38;2;166;218;149:*configure.ac=0;38;2;139;213;202:*.bash_profile=0;38;2;166;218;149:*.clang-format=0;38;2;139;213;202:*.editorconfig=0;38;2;139;213;202:*CHANGELOG.txt=0;38;2;36;39;58;48;2;238;212;159:*.gitattributes=0;38;2;139;213;202:*.gitlab-ci.yml=0;38;2;166;218;149:*CMakeCache.txt=0;38;2;91;96;120:*CMakeLists.txt=0;38;2;139;213;202:*LICENSE-APACHE=0;38;2;147;154;183:*pyproject.toml=0;38;2;139;213;202:*CODE_OF_CONDUCT=0;38;2;36;39;58;48;2;238;212;159:*CONTRIBUTING.md=0;38;2;36;39;58;48;2;238;212;159:*CONTRIBUTORS.md=0;38;2;36;39;58;48;2;238;212;159:*.sconsign.dblite=0;38;2;91;96;120:*CONTRIBUTING.txt=0;38;2;36;39;58;48;2;238;212;159:*CONTRIBUTORS.txt=0;38;2;36;39;58;48;2;238;212;159:*requirements.txt=0;38;2;139;213;202:*package-lock.json=0;38;2;91;96;120:*CODE_OF_CONDUCT.md=0;38;2;36;39;58;48;2;238;212;159:*.CFUserTextEncoding=0;38;2;91;96;120:*CODE_OF_CONDUCT.txt=0;38;2;36;39;58;48;2;238;212;159:*azure-pipelines.yml=0;38;2;166;218;149'
|
|
|
|
export LS_COLORS
|
|
|
|
setopt ALWAYS_TO_END # Move cursor to the end of a completed word.
|
|
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
|
# setopt AUTO_MENU # Show completion menu on a successive tab press.
|
|
setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a trailing slash.
|
|
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
|
|
setopt EXTENDED_GLOB # Needed for file modification glob modifiers with compinit.
|
|
setopt GLOB_COMPLETE # Triggers completion after glob instead of expanding it.
|
|
setopt LIST_PACKED # Smaller list
|
|
setopt PATH_DIRS # Perform path search even on command names with slashes.
|
|
unsetopt MENU_COMPLETE # Do not autoselect the first completion entry.
|
|
unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
|
|
|
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
|
zstyle ':completion:*' list-prompt '%S%M matches%s'
|
|
|
|
# Use caching to make completion for commands such as dpkg and apt usable.
|
|
zstyle ':completion::complete:*' use-cache on
|
|
zstyle ':completion::complete:*' cache-path "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompcache"
|
|
|
|
# # Case-insensitive (all), partial-word, and then substring completion.
|
|
# if zstyle -t ':zsh-utils:plugin:completion:*' case-sensitive; then
|
|
# zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
|
# setopt CASE_GLOB
|
|
# else
|
|
# zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
|
# unsetopt CASE_GLOB
|
|
# fi
|
|
|
|
# Group matches and describe.
|
|
zstyle ':completion:*:*:*:*:*' menu yes select interactive search
|
|
zstyle ':completion:*:matches' group 'yes'
|
|
zstyle ':completion:*:options' description 'yes'
|
|
zstyle ':completion:*:options' auto-description '%d'
|
|
zstyle ':completion:*:corrections' format ' %F{red}-- %d (errors: %e) --%f'
|
|
zstyle ':completion:*:descriptions' format ' %F{purple}-- %d --%f'
|
|
zstyle ':completion:*:messages' format ' %F{green} -- %d --%f'
|
|
zstyle ':completion:*:warnings' format ' %F{yellow}-- no matches found --%f'
|
|
zstyle ':completion:*' complete-options true
|
|
zstyle ':completion:*' format ' %F{blue}-- %d --%f'
|
|
zstyle ':completion:*' group-name ''
|
|
zstyle ':completion:*' verbose yes
|
|
zstyle ':completion:*' keep-prefix true
|
|
|
|
# Fuzzy match mistyped completions.
|
|
zstyle ':completion:*' completer _complete _match _approximate
|
|
zstyle ':completion:*:match:*' original only
|
|
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
|
|
|
# Increase the number of errors based on the length of the typed word. But make
|
|
# sure to cap (at 7) the max-errors to avoid hanging.
|
|
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'
|
|
|
|
# Don't complete unavailable commands.
|
|
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
|
|
|
# Array completion element sorting.
|
|
# zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
|
|
|
# Directories
|
|
# zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
|
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
|
# zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
|
zstyle ':completion:*' squeeze-slashes true
|
|
zstyle ':completion:*' special-dirs ..
|
|
zstyle ':completion:*' file-list all
|
|
zstyle ':completion:*' list-dirs-first true
|
|
|
|
# History
|
|
zstyle ':completion:*:history-words' stop yes
|
|
zstyle ':completion:*:history-words' remove-all-dups yes
|
|
zstyle ':completion:*:history-words' list false
|
|
zstyle ':completion:*:history-words' menu yes
|
|
|
|
# Environment Variables
|
|
zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
|
|
|
|
# Ignore multiple entries.
|
|
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
|
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
|
|
|
# Kill
|
|
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
|
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
|
|
zstyle ':completion:*:*:kill:*' menu yes select
|
|
zstyle ':completion:*:*:kill:*' force-list always
|
|
zstyle ':completion:*:*:kill:*' insert-ids single
|
|
|
|
# complete manual by their section
|
|
zstyle ':completion:*:manuals' separate-sections true
|
|
zstyle ':completion:*:manuals.*' insert-sections true
|
|
zstyle ':completion:*:man:*' menu yes select
|