Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele77 committed Apr 19, 2022
1 parent da698ce commit df185bc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased
## [2.0.1] - 2022-04-19

- Add a non-blocking exec method to schedulers (issue [#127](https://github.com/daniele77/cli/issues/127))
- Add a Menu::Insert method working with free functions as handler
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

cmake_minimum_required(VERSION 3.8)

project(cli VERSION 2.0.0
project(cli VERSION 2.0.1
# DESCRIPTION "A library for interactive command line interfaces in modern C++"
LANGUAGES CXX)

Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,34 @@ myMenu->Insert("lambda", [](std::ostream& out, int x){ out << x << std::endl; }

```
There is no limit to the number of parameters that a command handler can take
(however, they can only be basic types or `std::string`s):
```
myMenu->Insert(
"mycmd",
[](std::ostream& out, int a, double b, const std::string& c, bool d, long e)
{
...
} );

```
If you need it, you can have a command handlers taking an arbitrary
number of string parameters:
```
myMenu->Insert(
"mycmd",
[](std::ostream& out, const std::vector<std::string>& pars)
{
...
} );

```
Please note that in this case your command handler must take *only one*
parameter of type `std::vector<std::string>`.
## License
Expand Down

0 comments on commit df185bc

Please sign in to comment.