documentation rewritten
This commit is contained in:
@@ -2,86 +2,54 @@
|
|||||||
|
|
||||||
MIAOU-BASH is a mix of scripts and settings aiming for leveraging
|
MIAOU-BASH is a mix of scripts and settings aiming for leveraging
|
||||||
your terminal experience. As the name suggests, it is based on Bash
|
your terminal experience. As the name suggests, it is based on Bash
|
||||||
and expect to work on any modern GNU/Linux.
|
and expect to work on most of any modern GNU/Linux. However, at
|
||||||
|
this stage, the installation process only supports 2 distribution families:
|
||||||
|
|
||||||
Actually the installation process supports only 2 distros: Debian and Arch Linux.
|
* Debian *Like* : Debian, Mint, Ubuntu, ...
|
||||||
This package works either standalone or as a core dependency of any other
|
* Arch *Like* : ArchLinux, Manjaro, ...
|
||||||
miaou-* utilities.
|
|
||||||
|
|
||||||
Be aware (uppercase) MIAOU-BASH refer to a bunch of scripts and configuration settings.
|
Be aware MIAOU-BASH (uppercase) refers to the whole package itself.
|
||||||
Meanwhile (downcase) `miaou-bash` refer to only one of these scripts,
|
Meanwhile `miaou-bash` (downcase) refers to the only one, yet useful, utility script.
|
||||||
maybe the most useful one!
|
|
||||||
|
|
||||||
This is free software and licensed as: Affero GPL v3 +
|
This is free software and licensed as: Affero GPL v3 +
|
||||||
Any feedback would be appreciated.
|
Any feedback appreciated: [contact@artcode.re](mailto:contact@artcode.re)
|
||||||
[contact@artcode.re](mailto:contact@artcode.re)
|
|
||||||
|
|
||||||
## Featuring
|
## Featuring
|
||||||
|
|
||||||
* [x] miaou-bash
|
|
||||||
* [x] default settings
|
* [x] default settings
|
||||||
* [x] inputrc
|
* [x] inputrc
|
||||||
* [x] vimrc
|
|
||||||
* [x] bashrc
|
* [x] bashrc
|
||||||
* [x] semver-git_tag
|
* [x] some aliases (l, ll, ltr, ...)
|
||||||
* [x] some aliases (l, ll, ltr, ...)
|
* [x] smart prompt
|
||||||
* [x] smart prompt
|
* [x] git, failure aware
|
||||||
* [x] git, failure aware
|
* [x] vimrc
|
||||||
|
* [x] miaou-bash
|
||||||
|
* [x] error-prone
|
||||||
|
* [x] stacktrace
|
||||||
|
* [x] tools
|
||||||
|
* [x] semver-git_tag
|
||||||
|
* [x] fqdn
|
||||||
|
|
||||||
## install
|
## install
|
||||||
|
|
||||||
```bash
|
`curl -s https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash && exec bash`
|
||||||
curl -s https://git.artcode.re/miaou/miaou-bash/raw/branch/main/install.sh | sudo bash && exec bash
|
|
||||||
```
|
|
||||||
|
|
||||||
## upgrade
|
## upgrade
|
||||||
|
|
||||||
```bash
|
`miaou-bash --self-upgrade`
|
||||||
miaou-bash --self-upgrade
|
|
||||||
```
|
|
||||||
|
|
||||||
## uninstall
|
## uninstall
|
||||||
|
|
||||||
```bash
|
`miaou-bash --uninstall && exec bash`
|
||||||
miaou-bash --uninstall
|
|
||||||
|
|
||||||
```
|
## Readline main bindings
|
||||||
|
|
||||||
## 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
|
|
||||||
|
|
||||||
## useful library
|
|
||||||
|
|
||||||
* source /opt/miaou-bash/lib/functions.bash
|
|
||||||
|
|
||||||
## extra bindkeys
|
|
||||||
|
|
||||||
* CTRL LEFT, RIGHT => move around words, back and forward
|
|
||||||
* CTRL DELETE, BACKSPACE => delete word
|
|
||||||
* ALT DELETE, BACKSPACE => delete line from cursor
|
|
||||||
* CTRL + SHIFT + / => undo
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# moving around words with CTRL+Left or CTRL+Right
|
# CTRL + { left, right } for moving around words
|
||||||
# moving around Big Words with ALT+Left or ALT+Right (faster)
|
# ALT + { left, right } for moving around Big:Words (faster)
|
||||||
# suppressing word with CTRL+Backspace or CTRL+Delete
|
# CTRL + { backspace, delete } for word suppressing
|
||||||
# suppressing until start/end with ALT+Backspace or ALT+Delete (faster)
|
# ALT + { backspace, delete } for suppressing until start/end (faster)
|
||||||
# suppressing whole line with SHIFT+Delete or SHIFT+Backspacemoving around words with CTRL + Left or CTRL + Right
|
# SHIFT + { backspace, delete } for suppressing the whole line
|
||||||
# undo with CTRL+SHIFT+/
|
# { CTRL, ALT } + u for undo
|
||||||
|
# { up, down } for history search
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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
|
|
||||||
|
|
||||||
NEW NOTE
|
|
||||||
========
|
|
||||||
|
|
||||||
|
|||||||
@@ -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))
|
||||||
|
`
|
||||||
@@ -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
@@ -1,5 +1,9 @@
|
|||||||
# Documentation
|
# Documentation
|
||||||
|
|
||||||
|
* [Bash Tips](./bash_tips.md)
|
||||||
|
* [Development Mode](./development.md)
|
||||||
|
* [TODO](./todo.md)
|
||||||
|
|
||||||
## prevent last false
|
## prevent last false
|
||||||
|
|
||||||
function body should not end up with a ternary statement
|
function body should not end up with a ternary statement
|
||||||
@@ -36,4 +40,3 @@ count=0
|
|||||||
count=0
|
count=0
|
||||||
count=$((count+1))
|
count=$((count+1))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user