toolcontext: provide option `set-dummy-tool` used to fix the `toolname` and `version` services so they return respectively "DUMMY_TOOL" and "DUMMY_VERSION".

Useful for testing.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
template: add `Template::addn` service

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
toolcontext: add `bash_completion` generation option for nit tools.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/standard: assert "/home/../".simplify_path == "/"

Fixes #614

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add `test_toolcontext`

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Merge: Tired of having to remember all the Nit options? Try bash_completion!

This PR enables the option --gen-bash-completion that allow user to generate a bash completion file.

Exemple with `nitdoc`:

    $ nitdoc --gen-bash-completion
    $ sudo ln -s <nitdir>/bin/nitdoc.bash /etc/bash_completion.d/nitdoc
    $ . /etc/bash_completion.d/nitdoc

Then:

    $ nitdoc [TAB][TAB]
    $ file1.nit    file2.nit    file3.nit

    $ nitdoc --[TAB][TAB]
    --bash-toolname         --github-base-sha1      --no-dot                --sharedir
    --custom-brand          --github-gitdir         --only-metamodel        --shareurl
    --custom-footer-text    --github-upstream       --only-parse            --source
    --custom-overview-text  --help                  --path                  --stop-on-first-error
    --custom-title          --ignore-visibility     --piwik-site-id         --verbose
    --dir                   --log                   --piwik-tracker         --version
    --disable-phase         --log-dir               --private               --warn
    --gen-bash-completion   --no-color              --quiet

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

Pull-Request: #575
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Merge: lib/standard: assert "/home/../".simplify_path == "/"

Fixes #614

Pull-Request: #615
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>