no systematic setting of PROMPT_DIRTRIM
adding comments and documentation
optimisation : less operation