From 7ff5734d5d4ef8497ec8a1af7ecb8d4536c440e7 Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri Date: Sun, 6 Oct 2019 23:27:51 +0800 Subject: [PATCH] Add documentation for the inc command --- docs/commands/inc.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/commands/inc.md diff --git a/docs/commands/inc.md b/docs/commands/inc.md new file mode 100644 index 0000000000..c6dcb8d806 --- /dev/null +++ b/docs/commands/inc.md @@ -0,0 +1,31 @@ +# inc + +This command increments the value of variable by one. + +## Examples + +```shell +> open rustfmt.toml +--------- + edition +--------- + 2018 +--------- +> open rustfmt.toml | inc edition +--------- + edition +--------- + 2019 +--------- +``` + +```shell +> open Cargo.toml | get package.version +0.1.3 +> open Cargo.toml | inc package.version --major | get package.version +1.0.0 +> open Cargo.toml | inc package.version --minor | get package.version +0.2.0 +> open Cargo.toml | inc package.version --patch | get package.version +0.1.4 +``` \ No newline at end of file