tool_context: bashcompletion use the basename of sys.program_name
authorJean Privat <jean@pryen.org>
Thu, 24 Jul 2014 15:06:29 +0000 (11:06 -0400)
committerJean Privat <jean@pryen.org>
Thu, 24 Jul 2014 15:06:29 +0000 (11:06 -0400)
as program_name can be a complex path.

Signed-off-by: Jean Privat <jean@pryen.org>

src/toolcontext.nit

index 36ed661..eaa3e4f 100644 (file)
@@ -301,7 +301,7 @@ class ToolContext
                if opt_set_dummy_tool.value then
                        return "DUMMY_TOOL"
                end
-               return sys.program_name
+               return sys.program_name.basename("")
        end
 
        # The identified root directory of the Nit project