mirror of
https://github.com/nushell/nushell
synced 2024-11-15 17:27:58 +00:00
721 B
721 B
inc
This command increments the value of variable by one.
Examples
> open rustfmt.toml
─────────┬──────
edition │ 2018
─────────┴──────
> open rustfmt.toml | inc edition
─────────┬──────
edition │ 2019
─────────┴──────
> open Cargo.toml | get package.version
0.15.1
> open Cargo.toml | inc package.version --major | get package.version
1.0.0
> open Cargo.toml | inc package.version --minor | get package.version
0.16.0
> open Cargo.toml | inc package.version --patch | get package.version
0.15.2