code: func autoComplete(line string, pos int, key rune) (string, int, bool) {
  	switch key {
  	case 0x01: // Ctrl-A
  		return line, 0, true
  	case 0x03: // Ctrl-C
  		exit()
  	case 0x05: // Ctrl-E
  		return line, len(line), true
  	case 0x09: // Ctrl-I (Tab)
  		_, _, chain, args := cli.FindCommand(string(line))
  		line := commandChain(chain, args)
  		return line, len(line), true
  	case 0x15: // Ctrl-U
  		return "", 0, true
  	case 0x1a: // Ctrl-Z
  		suspend()
  	case '?':
  		cmd, subcmds, chain, args := cli.FindCommand(string(line[0:pos]))
  		if cmd == nil {
  			term.Write([]byte(prompt))
  			term.Write([]byte(line))
  			term.Write([]byte("?\n"))
  		}
  		if subcmds != nil {
  			for _, c := range *subcmds {
  				term.Write([]byte(" " + c.Command))
  				term.Write([]byte("\n"))
  			}
  		} else if cmd == nil {
  			term.Write([]byte("Unknown command.\n"))
  		}
  
  		line := commandChain(chain, args)
  		return line, len(line), true
  	}
  	return "", 0, false
  }
docs: // autoComplete attempts to complete the user's input when certain
  // characters are typed.