mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Merge pull request #795 from chhetripradeep/pchhetri/inc
Add documentation for the inc command
This commit is contained in:
commit
8a6a688131
1 changed files with 31 additions and 0 deletions
31
docs/commands/inc.md
Normal file
31
docs/commands/inc.md
Normal file
|
@ -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
|
||||
```
|
Loading…
Reference in a new issue