Browse Source

simpler readme

pvincent 2 days ago
parent
commit
7f57b052c0
  1. 9
      README.md
  2. 41
      doc/index.md
  3. 2
      lib/initiate.bash
  4. 2
      test/stub/scenario.bash

9
README.md

@ -10,6 +10,8 @@ this stage, the installation process only supports 2 distribution families:
Be aware MIAOU-BASH (uppercase) refers to the whole package itself.
Meanwhile `miaou-bash` (downcase) refers to the only one, yet useful, utility script.
To fulfill maximum expectations, we do recommend installing the *Ghostty*
terminal app.
This is free software and licensed as: Affero GPL v3 +
Any feedback appreciated: [contact@artcode.re](mailto:contact@artcode.re)
@ -32,6 +34,7 @@ Any feedback appreciated: [contact@artcode.re](mailto:contact@artcode.re)
* [x] tools
* [x] semver-git_tag
* [x] fqdn
* [ ] ...
## install
<!-- markdownlint-disable MD013 MD025 -->
@ -45,12 +48,6 @@ Any feedback appreciated: [contact@artcode.re](mailto:contact@artcode.re)
`miaou-bash --uninstall && exec bash`
## initiate
Rk: useful when timezone has changed or ghostty command has been installed aftwerwards
`miaou-bash --initiate`
## Readline main bindings
```bash

41
doc/index.md

@ -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`

2
lib/initiate.bash

@ -58,7 +58,7 @@ function link_etc {
function arch_vimrc {
mkdir -p /etc/vim
if ! grep -q '/etc/vim/vimrc.local' /etc/vimrc; then
cat >>/etc/vimrc <<-EOF
cat >>/etc/vimrc <<EOF
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local

2
test/stub/scenario.bash

@ -13,7 +13,7 @@ function do_subshell_false {
}
function do_command_error_multiline {
miaou-bash <<-EOF
miaou-bash <<EOF
echo ok
false
echo SHOULD NOT APPEAR

Loading…
Cancel
Save