Skip to content

Commit

Permalink
v4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Dec 20, 2018
1 parent aac1bd2 commit 1df8f4c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 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.1.1

- Minor bugs fixed.
- `let` added for arithmetic operations.

## 4.0.0

- fixed issues [3](https://github.com/remisa-yousefvand/shellman/issues/3), [4](https://github.com/remisa-yousefvand/shellman/issues/4), [5](https://github.com/remisa-yousefvand/shellman/issues/5), [6](https://github.com/remisa-yousefvand/shellman/issues/6), [7](https://github.com/remisa-yousefvand/shellman/issues/7)
Expand Down
16 changes: 13 additions & 3 deletions COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@

- [switch case](#switch-case)

- [let](#let)

- [expr](#expr)

- [math ++](#math-++)
Expand Down Expand Up @@ -1241,7 +1243,7 @@ temp=${string%%"substring"*} && indexOf=`echo ${string%%"substring"*} | echo ${#
if integers are equal [↑](#Commands)

```bash
if (( int1 = ${2:int2} )); then
if (( int1 == ${2:int2} )); then
echo equal
fi
```
Expand Down Expand Up @@ -1311,7 +1313,7 @@ fi
if path exists (file, directory, link...) [↑](#Commands)

```bash
if [ -e "$path"; then
if [ -e "$path" ]; then
echo exists
fi
```
Expand Down Expand Up @@ -1521,12 +1523,20 @@ case "$item" in
esac
```

## `let`

arithmetic operations [↑](#Commands)

```bash
let "result = var1 ${3|+,-,*,/,%|} var2"
```

## `expr`

arithmetic operations [↑](#Commands)

```bash
expr 2 * 3
expr 2 ${2|+,-,\*,/,%|} 3
```

## `math ++`
Expand Down
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.1.1

- Minor bugs fixed.
- `let` added for arithmetic operations.

### 4.0.0

- fixed issues [3](https://github.com/remisa-yousefvand/shellman/issues/3), [4](https://github.com/remisa-yousefvand/shellman/issues/4), [5](https://github.com/remisa-yousefvand/shellman/issues/5), [6](https://github.com/remisa-yousefvand/shellman/issues/6), [7](https://github.com/remisa-yousefvand/shellman/issues/7)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion 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.0.0",
"version": "4.1.1",
"publisher": "Remisa",
"icon": "images/icon.png",
"license": "SEE LICENSE IN LICENSE.md",
Expand Down
11 changes: 8 additions & 3 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@
"if_int_equal": {
"prefix": "if int =",
"body": [
"if (( ${1:int1} = ${2:int2} )); then",
"if (( ${1:int1} == ${2:int2} )); then",
"\t${3:echo equal}",
"fi\n"
],
Expand Down Expand Up @@ -661,7 +661,7 @@
"if_exists": {
"prefix": "if exists",
"body": [
"if [ -e \"\\$${1:path}\"; then",
"if [ -e \"\\$${1:path}\" ]; then",
"\t${0:echo exists}",
"fi\n"
],
Expand Down Expand Up @@ -846,9 +846,14 @@
],
"description": "switch case"
},
"let": {
"prefix": "let",
"body": "let \"${1:result} = ${2:var1} ${3|+,-,*,/,%|} ${4:var2}\"\n",
"description": "arithmetic operations"
},
"expr": {
"prefix": "expr",
"body": "expr ${0:2 * 3}\n",
"body": "expr ${1:2} ${2|+,-,\\*,/,%|} ${3:3}\n",
"description": "arithmetic operations"
},
"math_inc": {
Expand Down

0 comments on commit 1df8f4c

Please sign in to comment.