Skip to content

Commit

Permalink
v4.3.1 fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Apr 3, 2019
1 parent c442d98 commit 137249f
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 75 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 4.3.1

- Fixed #10 in math namespace.
- Some enhancements in math namespace.

## 4.3.0

- Process commands `process ...`
Expand Down
81 changes: 65 additions & 16 deletions COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,24 @@

- [math +](#math-+)

- [math +=](#math-+=)

- [math -](#math--)

- [math -=](#math--=)

- [math *](#math-*)

- [math *=](#math-*=)

- [math /](#math-/)

- [math /=](#math-/=)

- [math %](#math-%)

- [math %=](#math-%=)

- [math ^](#math-^)

- [math random](#math-random)
Expand Down Expand Up @@ -1572,71 +1582,111 @@ expr 2 ${2|+,-,\*,/,%|} 3
increment variable [↑](#Commands)

```bash
$((${1|var++,++var|}))
((${1|var++,++var|}))
```

## `math --`

decrement variable [↑](#Commands)

```bash
$((${1|var--,--var|}))
((${1|var--,--var|}))
```

## `math +`

add two variables (+= assign result to var1) [↑](#Commands)
add two variables [↑](#Commands)

```bash
result=$((var1 + var2))
```

## `math +=`

add var1 and var2 and assign the result to var1 [↑](#Commands)

```bash
$((var1 ${2|+,+=|} var2))
((var1 += var2))
```

## `math -`

subtract var2 from var1 (-= assign result to var1) [↑](#Commands)
subtract var2 from var1 [↑](#Commands)

```bash
result=$((var1 - var2))
```

## `math -=`

subtract var2 from var1 and assign the result to var1 [↑](#Commands)

```bash
$((var1 ${2|-,-=|} var2))
((var1 -= var2))
```

## `math *`

multiply var1 and var2 (*= assign result to var1) [↑](#Commands)
multiply var1 by var2 [↑](#Commands)

```bash
$((var1 ${2|*,*=|} var2))
result=$((var1 * var2))
```

## `math *=`

multiply var1 by var2 and assign the result to var1 [↑](#Commands)

```bash
((var1 *= var2))
```

## `math /`

divide var1 by var2 (/= assign result to var1) [↑](#Commands)
divide var1 by var2 [↑](#Commands)

```bash
$((var1 ${2|/,/=|} var2))
result=$((var1 / var2))
```

## `math /=`

divide var1 by var2 and assign the result to var1 [↑](#Commands)

```bash
((var1 /= var2))
```

## `math %`

reminder of dividing var1 by var2 (%= assign result to var1) [↑](#Commands)
reminder of dividing var1 by var2 (modulus) [↑](#Commands)

```bash
$((var1 ${2|%,%=|} var2))
result=$((var1 % var2))
```

## `math %=`

divide var1 by var2 and assign the reminder to var1 [↑](#Commands)

```bash
((var1 %= var2))
```

## `math ^`

exponentiate base to power [↑](#Commands)

```bash
$((base ** power))
result=$((base ** power))
```

## `math random`

generate random integer x such as min < x < max [&uarr;](#Commands)
generate random integer x such as min <= x <= max [&uarr;](#Commands)

```bash
echo $((min + RANDOM % $((max-min))))
result=$((min + RANDOM % $((max-min))))
```

## `math √`
Expand Down Expand Up @@ -2307,4 +2357,3 @@ call scan function to scan a host over a port range [&uarr;](#Commands)
```bash
scan ${1|tcp,udp|} host fromPort toPort
```
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ Call function which is declared by `fn...`

## Release Notes

### 4.3.1

- Fixed #10 in math namespace.
- Some enhancements in math namespace.

### 4.3.0

- Process commands `process ...`
Expand Down
52 changes: 26 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "shellman",
"displayName": "shellman",
"description": "Bash script snippet",
"version": "4.3.0",
"version": "4.3.1",
"publisher": "Remisa",
"icon": "images/icon.png",
"license": "SEE LICENSE IN LICENSE.md",
Expand All @@ -29,7 +29,7 @@
]
},
"devDependencies": {
"cspell": "^3.2.1",
"cspell": "^3.2.2",
"fs": "0.0.1-security",
"path": "^0.12.7"
},
Expand Down
Loading

0 comments on commit 137249f

Please sign in to comment.