refactoring (eventually extraction bash completion)