def get_prompt(self):
        """
        Get the prompt string. Fill with current working directory if required.
        :return: the prompt
        :rtype: str
        """
        _, current_state = self.get_current_worker_and_state()

        prompt = current_state.environ_get('PROMPT')
        if prompt.find('\\W') != -1 or prompt.find('\\w') != -1:
            curdir = os.getcwd().replace(current_state.environ_get('HOME'), '~')
            prompt = prompt.replace('\\w', curdir)
            prompt = prompt.replace('\\W', curdir if os.path.dirname(curdir) == '~' else os.path.basename(curdir))

        return self.stash.text_color(prompt, 'smoke')

        Get the prompt string. Fill with current working directory if required.
        :return: the prompt
        :rtype: str
        
system/shruntime.py