diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-06-29 23:05:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-29 23:05:09 -0700 |
| commit | b9b2a38c7bd9fd66a5b324b4f398024ad2569d60 (patch) | |
| tree | a0aa4bc57649c64b11d1e1136a206b8bde5d637b | |
| parent | 8d7245a91e8130efd66561ddd90877837535cfab (diff) | |
| download | vcpkg-b9b2a38c7bd9fd66a5b324b4f398024ad2569d60.tar.gz vcpkg-b9b2a38c7bd9fd66a5b324b4f398024ad2569d60.zip | |
[vcpkg-integrate] Improve spelling, help, and autocomplete. (#7095)
| -rw-r--r-- | toolsrc/src/vcpkg/commands.integrate.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 6921a5390..fda9e2b11 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -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); |
