LazyCompletions
1.0.3
Lazy Tab completion for PowerShell commands: real completion scripts are only loaded on the first Tab press. Scans multiple completion directories, can generate completion scripts, and keeps shell startup cost near zero.
Minimum PowerShell version
7.0
Installation Options
Owners
Copyright
(c) 2026 efan. Licensed under the MIT License.
Package Details
Author(s)
- efan
Tags
TabCompletion ArgumentCompleter LazyLoad PSReadLine Completion
Functions
Import-LazyCompletion Add-LazyCompletion Get-LazyCompletion Get-LazyCompletionsPath Set-LazyCompletionsPath Add-LazyCompletionsPath Get-LazyCache Set-LazyCache Clear-LazyCache Update-LazyCache
PSEditions
Dependencies
This module has no dependencies.
Release Notes
1.0.3 - README accuracy update (no behavior change)
- "How it works" / cache-policy sections aligned with the current implementation:
registration is always incremental (per-file mtime; unchanged scripts zero parsing);
dir mtime (dirTicks) only drives Sync full rescans; Async/Mixed never write on the
main thread (a background job maintains the cache)
1.0.2 - Ready-made configurations (documentation)
Four out-of-the-box configurations (details in README):
# 1. No cache (default): cache off, every startup scans
Import-Module LazyCompletions
Import-LazyCompletion
# 2. Cache, Sync maintenance (default mode): stale caches fixed during Import
Import-Module LazyCompletions
Set-LazyCache
Import-LazyCompletion
# 3. Cache, Mixed maintenance: Async Import (background fix, never blocks) + Sync Add
Import-Module LazyCompletions
Set-LazyCache -UpdateMode Mixed
Import-LazyCompletion
# 4. Deferred registration: registration on the first Tab (saves ~100ms startup);
# combines with 1-3
Import-Module LazyCompletions
Import-LazyCompletion -Deferred
1.0.1 - Cross-platform fixes
- Default completion dir: multi-segment path combine (a literal backslash segment produced a
weird directory name on Linux/macOS where '\' is not a path separator)
- Tests: platform-neutral paths (module root / completion scripts / exit-code generator)
1.0.0 - Initial public release
- Lazy Tab completion: real completion scripts are only loaded on the first Tab press
- Automatic scanning of multiple completion directories with command-name parsing
- Add-LazyCompletion: register existing / generate new / self-bootstrap completions
- Optional binary index cache (Set-LazyCache) to speed up startup
- Optional Native DLL layer (-UseNative) for hot-path performance
FileList
- LazyCompletions.nuspec
- README.md
- Tests\LazyCompletions.Tests.ps1
- AGENTS.md
- LazyCompletions.Native.cs
- LazyCompletions.psd1
- PSScriptAnalyzerSettings.psd1
- CODEMAP.md
- LazyCompletions.psm1
- Tests\ParamLevel.Verify.ps1
- LazyCompletions.Self.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.3 (current version) | 9 | 8/4/2026 |
| 1.0.2 | 3 | 8/4/2026 |
| 1.0.1 | 5 | 8/4/2026 |
| 1.0.0 | 6 | 8/4/2026 |