simpler readme
This commit is contained in:
+5
-36
@@ -1,42 +1,11 @@
|
||||
# Documentation
|
||||
|
||||
* initiate
|
||||
* [Bash Tips](./bash_tips.md)
|
||||
* [Development Mode](./development.md)
|
||||
* [TODO](./todo.md)
|
||||
* [todo](./todo.md)
|
||||
|
||||
## prevent last false
|
||||
## initiate
|
||||
|
||||
function body should not end up with a ternary statement
|
||||
Rk: useful when timezone has changed or ghostty command has been installed aftwerwards
|
||||
|
||||
### 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))
|
||||
```
|
||||
`miaou-bash --initiate`
|
||||
|
||||
Reference in New Issue
Block a user