File tree Expand file tree Collapse file tree 11 files changed +66
-11
lines changed Expand file tree Collapse file tree 11 files changed +66
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,32 @@ The versions follow the rules of [Semantic Versioning 2.0.0](http://semver.org/s
8
8
9
9
## [ Unreleased]
10
10
11
- [ Full Changes] ( https://github.com/adoyle-h/lobash/compare/master...develop )
11
+ [ Full Changes] ( https://github.com/adoyle-h/lobash/compare/v0.7.0...HEAD )
12
+
13
+
14
+ <a name =" v0.7.0 " ></a >
15
+ ## v0.7.0 (2024-09-06 21:38:01 +08:00)
16
+
17
+ [ Full Changes] ( https://github.com/adoyle-h/lobash/compare/v0.6.0...v0.7.0 )
18
+
19
+ ### New Features
20
+
21
+ - add module l.array_size ([ 2b4f2a1] ( https://github.com/adoyle-h/lobash/commit/2b4f2a1ee2e8854665fc527243004bbc78d74085 ) )
22
+ - add module l.parse_args. And l.parse_params is deprecated. ([ b506bf5] ( https://github.com/adoyle-h/lobash/commit/b506bf5f8aa2da8e38f031d484b533d1c0db4e16 ) )
23
+ > User should use l.parse_args instead of l.parse_params.
24
+ > The l.parse_params has some limitations on use. So it is deprecated and
25
+ > will be removed in soon.
26
+ - add module l.array_has_key ([ 00013b0] ( https://github.com/adoyle-h/lobash/commit/00013b0ddb927902c5069cfa89548f351f602a22 ) )
27
+ - add module: is_associative_array ([ 80f3153] ( https://github.com/adoyle-h/lobash/commit/80f31539e1360b91132d02db9fe610dad5cef7c8 ) )
28
+ - add modules: var_attrs ([ b5455e4] ( https://github.com/adoyle-h/lobash/commit/b5455e45abb7764f742d218700d283423f4d2e07 ) )
29
+
30
+ ### Document Changes
31
+
32
+ - update docs ([ e723a75] ( https://github.com/adoyle-h/lobash/commit/e723a75f9842a8f2f9f32e996a0e41bb1e56794a ) )
33
+ - update README ([ 0ab8056] ( https://github.com/adoyle-h/lobash/commit/0ab8056872f21ec8252a46d517d9a0d6bb6c9be0 ) )
34
+ - improve CONTRIBUTING ([ 784aa24] ( https://github.com/adoyle-h/lobash/commit/784aa24f4ceafd44e48a0a45ef3110ba506b8018 ) )
35
+ - renew license && add CONTRIBUTING in Chinese ([ dbd4e6d] ( https://github.com/adoyle-h/lobash/commit/dbd4e6d15fc649af036b40d57591eca1a6419d33 ) )
36
+ - update version in README ([ cf8883e] ( https://github.com/adoyle-h/lobash/commit/cf8883ecb29b7309ec722d327b3ca1d3bd8c4bdc ) )
12
37
13
38
<a name =" v0.6.0 " ></a >
14
39
## v0.6.0 (2022-12-15 02:35:30 +08:00)
Original file line number Diff line number Diff line change @@ -65,9 +65,9 @@ Lobash helps to reduce the mental burden on developers.
65
65
## CI Status
66
66
67
67
- [ develop branch] ( https://github.com/adoyle-h/lobash/tree/develop ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=develop )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Adevelop )
68
+ - [ v0.7.0] ( https://github.com/adoyle-h/lobash/tree/v0.7.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.7.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.7.0 )
68
69
- [ v0.6.0] ( https://github.com/adoyle-h/lobash/tree/v0.6.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.6.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.6.0 )
69
70
- [ v0.5.1] ( https://github.com/adoyle-h/lobash/tree/v0.5.1 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.1 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.1 )
70
- - [ v0.5.0] ( https://github.com/adoyle-h/lobash/tree/v0.5.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.0 )
71
71
72
72
## Versions
73
73
@@ -135,7 +135,7 @@ Make sure below dependencies have been installed in your system.
135
135
Available Lobash versions refer to [ Git Tags] ( https://github.com/adoyle-h/lobash/tags ) which named like "vX.Y.Z".
136
136
137
137
``` sh
138
- VERSION=v0.6 .0 # or VERSION=develop, but develop branch is unstable.
138
+ VERSION=v0.7 .0 # or VERSION=develop, but develop branch is unstable.
139
139
# Download source codes
140
140
git clone --depth 1 --branch $VERSION https://github.com/adoyle-h/lobash.git
141
141
cd lobash
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ Lobash 能减少开发者的心智负担。
64
64
## CI 状态
65
65
66
66
- [ develop 分支] ( https://github.com/adoyle-h/lobash/tree/develop ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=develop )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Adevelop )
67
+ - [ v0.7.0] ( https://github.com/adoyle-h/lobash/tree/v0.7.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.7.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.7.0 )
67
68
- [ v0.6.0] ( https://github.com/adoyle-h/lobash/tree/v0.6.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.6.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.6.0 )
68
- - [ v0.5.0] ( https://github.com/adoyle-h/lobash/tree/v0.5.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.0 )
69
- - [ v0.4.0] ( https://github.com/adoyle-h/lobash/tree/v0.4.0 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.4.0 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.4.0 )
69
+ - [ v0.5.1] ( https://github.com/adoyle-h/lobash/tree/v0.5.1 ) : [ ![ CI Status] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.1 )] ( https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.1 )
70
70
71
71
## 版本
72
72
@@ -135,7 +135,7 @@ Bash 4.4 以下版本都有很多 BUG,强烈建议用户升级到 Bash 4.4 以
135
135
在 [ Git Tags] ( https://github.com/adoyle-h/lobash/tags ) 中查看 Lobash 的可用版本 ("vX.Y.Z")。
136
136
137
137
``` sh
138
- VERSION=v0.6 .0 # 或者 VERSION=develop,但是 develop 分支不稳定
138
+ VERSION=v0.7 .0 # 或者 VERSION=develop,但是 develop 分支不稳定
139
139
# 下载源码
140
140
git clone --depth 1 --branch $VERSION https://github.com/adoyle-h/lobash.git
141
141
cd lobash
Original file line number Diff line number Diff line change 1
- 0.6 .0
1
+ 0.7 .0
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ PREFIX: l.
12
12
- [ ] sub
13
13
14
14
- [ ] Array
15
+ - [ ] array_has_key
15
16
- [ ] array_include
16
17
- [ ] array_include.s
17
18
- [ ] array_reverse
19
+ - [ ] array_size
18
20
- [ ] each
19
21
- [ ] each.p
20
22
- [ ] first
Original file line number Diff line number Diff line change 1
1
# Module Usages
2
2
3
- 15 Categories, 143 Modules, 802 Test Cases.
3
+ 15 Categories, 145 Modules, 817 Test Cases.
4
4
5
5
Each module provides only one function which naming prefixed with ` l. ` by default.
6
6
@@ -23,9 +23,11 @@ Most Lobash modules support Bash 4.0+ except below modules.
23
23
- [ inc] ( ./arithmetic.md#inc )
24
24
- [ sub] ( ./arithmetic.md#sub )
25
25
- [ Array] ( ./array.md )
26
+ - [ array_has_key] ( ./array.md#array_has_key )
26
27
- [ array_include] ( ./array.md#array_include )
27
28
- [ array_include.s] ( ./array.md#array_includes )
28
29
- [ array_reverse] ( ./array.md#array_reverse )
30
+ - [ array_size] ( ./array.md#array_size )
29
31
- [ each] ( ./array.md#each )
30
32
- [ each.p] ( ./array.md#eachp )
31
33
- [ first] ( ./array.md#first )
Original file line number Diff line number Diff line change 4
4
5
5
## TOC
6
6
7
+ - [ array_has_key] ( #array_has_key )
7
8
- [ array_include] ( #array_include )
8
9
- [ array_include.s] ( #array_includes )
9
10
- [ array_reverse] ( #array_reverse )
11
+ - [ array_size] ( #array_size )
10
12
- [ each] ( #each )
11
13
- [ each.p] ( #eachp )
12
14
- [ first] ( #first )
20
22
21
23
## Modules
22
24
25
+ ### array_has_key
26
+
27
+ - Usage: ` l.array_has_key <array_name> <key_name> `
28
+ - Description:
29
+ - Check key whether defined in array or associative array.
30
+ - Return 0 (true) or 1 (false). This function should never throw exception error.
31
+ - Since: 0.7.0
32
+ - Bash: 4.0+
33
+ - Test Cases: [ tests/modules/array_has_key.bats] ( ../../tests/modules/array_has_key.bats )
34
+ - Source Code: [ src/modules/array_has_key.bash] ( ../../src/modules/array_has_key.bash )
35
+
23
36
### array_include
24
37
25
38
- Usage: ` l.array_include <array_name> <match> `
56
69
- Test Cases: [ tests/modules/array_reverse.bats] ( ../../tests/modules/array_reverse.bats )
57
70
- Source Code: [ src/modules/array_reverse.bash] ( ../../src/modules/array_reverse.bash )
58
71
72
+ ### array_size
73
+
74
+ - Usage: ` l.array_size <array_name> `
75
+ - Description:
76
+ - Return the actual size of array and associative array
77
+ - For ` declare -A array=([test]='') ` , the ` ${#array[@]} ` is 0, because bash excludes the null value.
78
+ - Since: 0.7.0
79
+ - Bash: 4.0+
80
+ - Test Cases: [ tests/modules/array_size.bats] ( ../../tests/modules/array_size.bats )
81
+ - Source Code: [ src/modules/array_size.bash] ( ../../src/modules/array_size.bash )
82
+
59
83
### each
60
84
61
85
- Usage:
Original file line number Diff line number Diff line change 47
47
- "count": the value of option defaults to 0. And increasing count by times. For example: ` -v ` ` -vv ` ` -vvv ` .
48
48
- "kv": key/value. It means the option must has an argument. If user not pass argument to "kv" option. It will print error and stop.
49
49
- See test cases for details.
50
- - Dependent: [ ` each ` ] ( ./array.md#each ) [ ` match_list ` ] ( ./string.md#match_list ) [ ` var_attrs ` ] ( ./variable.md#var_attrs )
50
+ - Dependent: [ ` each ` ] ( ./array.md#each ) [ ` match_list ` ] ( ./string.md#match_list ) [ ` var_attrs ` ] ( ./variable.md#var_attrs ) [ ` array_has_key ` ] ( ./array.md#array_has_key )
51
51
- Since: 0.7.0
52
52
- Bash: 4.0+
53
53
- ** Notice** : ** Only with bash 4.3, there may be something wrong if opts and args are not array.**
Original file line number Diff line number Diff line change
1
+ array_has_key
1
2
array_include
2
3
array_include.s
3
4
array_reverse
5
+ array_size
4
6
each
5
7
each.p
6
8
first
Original file line number Diff line number Diff line change 1
1
# ---
2
2
# Category: Array
3
- # Since: next
3
+ # Since: 0.7.0
4
4
# Usage: l.array_has_key <array_name> <key_name>
5
5
# Description: Check key whether defined in array or associative array.
6
6
# Description: Return 0 (true) or 1 (false). This function should never throw exception error.
You can’t perform that action at this time.
0 commit comments