Remove leading spaces for terminfo compatibility