Skip to main content

Shell Completion

Typing long target names or parameters can be tedious and error-prone. The NUKE global tool can help you enter invocations more quickly and without typos.

info

The shell completion feature relies on the presence of an up-to-date .nuke/build.schema.json file. This file is updated with every execution of your build project.

Whenever you add or change one of your targets or parameters, it is recommended to trigger your build once, for instance by calling nuke --help.

Configuration

Add the following snippets to the configuration file of your shell:

Microsoft.PowerShell_profile.ps1
Register-ArgumentCompleter -Native -CommandName nuke -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
nuke :complete "$wordToComplete" | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}

Usage

You can complete targets, parameters, and enumeration values by hitting the TAB key: