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

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name LazyCompletions

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name LazyCompletions

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

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

Core

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

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