finally compelted
use "!" as flag to get prompt string
use "h" as flag to get help menu
and "s###" to set rainbow lenght to ###
place lines in ~/.bashrc
export PROMPT_COMMAND='`path/to/binary`'
PS1='`path/to/binary "!"`'
added the rainbow lib and made the program read, incrament and export the rainbow env vars