mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[vcpkg-integrate] Improve spelling, help, and autocomplete. (#7095)
This commit is contained in:
parent
8d7245a91e
commit
b9b2a38c7b
@ -409,7 +409,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
|
||||
|
||||
Checks::exit_with_code(VCPKG_LINE_INFO, rc);
|
||||
}
|
||||
#elif defined(__unix__)
|
||||
#else
|
||||
static void integrate_bash(const VcpkgPaths& paths)
|
||||
{
|
||||
const auto home_path = System::get_environment_variable("HOME").value_or_exit(VCPKG_LINE_INFO);
|
||||
@ -458,11 +458,12 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
|
||||
"first use\n"
|
||||
" vcpkg integrate remove Remove user-wide integration\n"
|
||||
" vcpkg integrate project Generate a referencing nuget package for individual VS project use\n"
|
||||
" vcpkg integrate powershell Enable PowerShell Tab-Completion\n";
|
||||
" vcpkg integrate powershell Enable PowerShell tab-completion\n";
|
||||
#else
|
||||
const char* const INTEGRATE_COMMAND_HELPSTRING =
|
||||
" vcpkg integrate install Make installed packages available user-wide.\n"
|
||||
" vcpkg integrate remove Remove user-wide integration\n";
|
||||
" vcpkg integrate remove Remove user-wide integration\n"
|
||||
" vcpkg integrate bash Enable bash tab-completion\n";
|
||||
#endif
|
||||
|
||||
namespace Subcommand
|
||||
@ -476,7 +477,15 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
|
||||
|
||||
static std::vector<std::string> valid_arguments(const VcpkgPaths&)
|
||||
{
|
||||
return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT, Subcommand::POWERSHELL, Subcommand::BASH};
|
||||
return
|
||||
{
|
||||
Subcommand::INSTALL, Subcommand::REMOVE,
|
||||
#if defined(_WIN32)
|
||||
Subcommand::PROJECT, Subcommand::POWERSHELL,
|
||||
#else
|
||||
Subcommand::BASH,
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
const CommandStructure COMMAND_STRUCTURE = {
|
||||
@ -510,7 +519,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
|
||||
{
|
||||
return integrate_powershell(paths);
|
||||
}
|
||||
#elif defined(__unix__)
|
||||
#else
|
||||
if (args.command_arguments[0] == Subcommand::BASH)
|
||||
{
|
||||
return integrate_bash(paths);
|
||||
|
Loading…
x
Reference in New Issue
Block a user