clean the code for _tssh_completion function