Closed vzhuqin closed 3 years ago
The doc was removed from the original https://docs.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/install-ml-net-cli , could someone provide the new docs to verify?
@LittleLittleCloud after the dotnet-suggest updates merged, what are the setup instructions (if any) to get this working on the CLI? Is it the same as the instructions that were removed from the doc?
Since the ML.NET CLI is based on System.CommandLine
, it has built-in support for tab completion.
An example of how tab auto completion works is shown in the following animation:
'Tab-based auto-completion' (parameter suggestions) works on Windows PowerShell and macOS/Linux bash but it won't work on Windows CMD.
To enable it, in the current preview version, the end user has to take a few steps once per shell, outlined below. Once this is done, completions will work for all apps written using System.CommandLine
such as the ML.NET CLI.
On the machine where you'd like to enable completion, you'll need to do two things.
Install the dotnet-suggest
global tool by running the following command:
dotnet tool install dotnet-suggest -g
Add the appropriate shim script to your shell profile. You may have to create a shell profile file. The shim script will forward completion requests from your shell to the dotnet-suggest
tool, which delegates to the appropriate System.CommandLine
-based app.
For bash, add the contents of dotnet-suggest-shim.bash to ~/.bash_profile
.
For PowerShell, add the contents of dotnet-suggest-shim.ps1 to your PowerShell profile. You can find the expected path to your PowerShell profile by running the following command in your console:
echo $profile
@luisquintanilla Yes, the setup step is identical with previous cli.
https://github.com/dotnet/command-line-api/blob/main/docs/Features-overview.md#Suggestions
Great. Thanks
System Information (please complete the following information):
To Reproduce Steps to reproduce the behavior: 1.After install tool ML.NET CLI, on PowerShell, run below: dotnet tool install dotnet-suggest -g echo $profile
Expected behavior Set up CLI suggestions (tab-based auto-completion) can work.
Screenshots
Additional context https://docs.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/install-ml-net-cli