fixed shell prompt logic for nesteed shells