From 31c4de315a218117f2f88742b3be58f9df9b76ac Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Dec 2016 13:14:10 -0800 Subject: Add "vcpkg /?" which is equivalent to "vcpkg help" --- toolsrc/src/commands_other.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'toolsrc/src/commands_other.cpp') diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 5f4128bb1..bb1768048 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -74,6 +74,7 @@ namespace vcpkg const std::vector>& get_available_commands_type_b() { static std::vector> t = { + {"/?", help_command}, {"help", help_command}, {"search", search_command}, {"list", list_command}, -- cgit v1.2.3 From 9796e2532cc34896e38a6c0702e538454ffb5586 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:10:29 -0800 Subject: Use System::println(std::string&) overload --- toolsrc/src/commands_other.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_other.cpp') diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index bb1768048..16b697952 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -50,7 +50,7 @@ namespace vcpkg void print_example(const char* command_and_arguments) { - System::println(create_example_string(command_and_arguments).c_str()); + System::println(create_example_string(command_and_arguments)); } void internal_test_command(const vcpkg_cmd_arguments& /*args*/, const vcpkg_paths& /*paths*/) -- cgit v1.2.3 From e523668cce29745d8024dd5d56ee1d705da24a49 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:13:24 -0800 Subject: Change signature to std::string& (from char*) --- toolsrc/src/commands_other.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_other.cpp') diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 16b697952..6df325100 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -41,14 +41,14 @@ namespace vcpkg , INTEGRATE_COMMAND_HELPSTRING); } - std::string create_example_string(const char* command_and_arguments) + std::string create_example_string(const std::string& command_and_arguments) { std::string cs = Strings::format("Example:\n" " vcpkg %s", command_and_arguments); return cs; } - void print_example(const char* command_and_arguments) + void print_example(const std::string& command_and_arguments) { System::println(create_example_string(command_and_arguments)); } -- cgit v1.2.3