Skip to main content

Shell Completion

Typing long target names or parameters can be tedious and error-prone. The global tool helps you to invoke commands more quickly and without any typos, similar to tab completion for the .NET CLI.

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:

Use Space to pause/play, ⬅ and ⮕ to seek backward/forward, or F to fullscreen.