def run(self, command, application):
        # command is a list of parsed commands
        if len(command) != 2:
            self._err.write("invalid syntax, must be: .cd dirname\n")
            return
        dirname = os.path.expandvars(os.path.expanduser(command[1]))
        try:
            self._chdir(dirname)
        except OSError as e:
            self._err.write("cd: %s\n" % e)
dataset/ETHPy150Open awslabs/aws-shell/awsshell/app.py/ChangeDirHandler.run/original