
source ~/.bashrc
trap_pollex() {
  if (( ${#BASH_SOURCE[@]} <= 1 )); then
      eval "pollex ${BASH_COMMAND}"
      if [[ $? == 0 ]]
      then
        false 
      fi
      true
  else
    true
  fi
}


echo "Trap settings is enabled. Every command will be executed through pollenisator and will be logged / imported depending on the tools called."
# turn on extended DEBUG hook behavior (necessary to suppress original commands).
if [[ $TRAP_FOR_POLLEX == "False" ]]
then
true
else
shopt -s extdebug

# install our trap
trap trap_pollex DEBUG
fi
