2019-10-06 17:27:51 +02:00
|
|
|
# inc
|
|
|
|
|
|
|
|
This command increments the value of variable by one.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
```shell
|
|
|
|
> open rustfmt.toml
|
2020-06-23 20:21:47 +02:00
|
|
|
─────────┬──────
|
|
|
|
edition │ 2018
|
|
|
|
─────────┴──────
|
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 17:27:51 +02:00
|
|
|
> open rustfmt.toml | inc edition
|
2020-06-23 20:21:47 +02:00
|
|
|
─────────┬──────
|
|
|
|
edition │ 2019
|
|
|
|
─────────┴──────
|
2019-10-06 17:27:51 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
|
|
|
> open Cargo.toml | get package.version
|
2020-06-23 20:21:47 +02:00
|
|
|
0.15.1
|
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 17:27:51 +02:00
|
|
|
> open Cargo.toml | inc package.version --major | get package.version
|
|
|
|
1.0.0
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 17:27:51 +02:00
|
|
|
> open Cargo.toml | inc package.version --minor | get package.version
|
2020-06-23 20:21:47 +02:00
|
|
|
0.16.0
|
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 17:27:51 +02:00
|
|
|
> open Cargo.toml | inc package.version --patch | get package.version
|
2020-06-23 20:21:47 +02:00
|
|
|
0.15.2
|
|
|
|
```
|