documentation rewritten

This commit is contained in:
pvincent
2026-08-10 17:37:32 +04:00
parent 13a5d98c8a
commit c14acaf6d0
5 changed files with 83 additions and 61 deletions
+38
View File
@@ -0,0 +1,38 @@
# Bash Tips
## prevent last false
function body should not end up with a ternary statement
### wrong last
Compound of 2 'false' statement returns false.
```bash
[[ : ]] && [[ : ]]
```
### right last
```bash
[[ : ]] && [[ : ]] || true
```
## arithmetic issue
last (++) statement does not complete successfully!
### wrong ++
```bash
count=0
(( ++count )) # ok
(( ++count )) # last statement in function returns false
```
### right ++
```bash
count=0
count=$((count+1))
`
+8
View File
@@ -0,0 +1,8 @@
# development mode (credentials required)
* REAL_DIR=/opt/miaou-bash
* sudo mkdir -m 755 $REAL_DIR && sudo chown $(id -un) $REAL_DIR
* git clone <git@artcode.re>:miaou/miaou-bash.git $REAL_DIR
* DEV_DIR=$HOME/DEV/BASH/miaou-bash # change DEST according to your needs!
* ln -s $REAL_DIR $DEV_DIR
* cd $REAL_DIR && sudo ./install.sh
+4 -1
View File
@@ -1,5 +1,9 @@
# Documentation
* [Bash Tips](./bash_tips.md)
* [Development Mode](./development.md)
* [TODO](./todo.md)
## prevent last false
function body should not end up with a ternary statement
@@ -36,4 +40,3 @@ count=0
count=0
count=$((count+1))
```
+5
View File
@@ -0,0 +1,5 @@
# TODO
* [ ] prompt git shows version with `+` when there is more than one commit over current version. ie: v0.0.0 + 2 commits more should display v-1.0.0+
* [ ] semver_git_tag should append `RELEASE_NOTES.md` from this TODO markdown file, providing that NEW NOTE section below contains appropriate items to fulfill the current release note
* [ ] git log <LATEST_TAG>..HEAD --oneline