code: def precmd(self, line):
          
          if not line.strip():
              return line
          args = line.split()
          while args[0] in self.aliases:
              line = self.aliases[args[0]]
              ii = 1
              for tmpArg in args[1:]:
                  line = line.replace("%" + str(ii),
                                        tmpArg)
                  ii += 1
              line = line.replace("%*", ' '.join(args[1:]))
              args = line.split()
          # split into ';;' separated commands
          # unless it's an alias command
          if args[0] != 'alias':
              marker = line.find(';;')
              if marker >= 0:
                  # queue up everything after marker
                  next = line[marker+2:].lstrip()
                  self.cmdqueue.append(next)
                  line = line[:marker].rstrip()
          return line
docs: Handle alias expansion and ';;' separator.