Repository: rclone/rclone
File: backend/drive/drive.go (Go)

Code before:
					if _, found := names[name]; !found {
						break
					}
					name += fmt.Sprintf("-%d", i)
				}
				names[name] = struct{}{}
				lines = append(lines, "")
				lines = append(lines, fmt.Sprintf("[%s]", name))
				lines = append(lines, "type = alias")
				lines = append(lines, fmt.Sprintf("remote = %s,team_drive=%s,root_folder_id=:", f.name, drive.Id))
				upstreams = append(upstreams, fmt.Sprintf(`"%s=%s:"`, name, name))
			}
			lines = append(lines, "")
			lines = append(lines, "[AllDrives]")
			lines = append(lines, "type = combine")
			lines = append(lines, fmt.Sprintf("upstreams = %s", strings.Join(upstreams, " ")))
			return lines, nil
		}
		return drives, nil
	case "untrash":
		dir := ""
		if len(arg) > 0 {
			dir = arg[0]
		}
		return f.unTrashDir(ctx, dir, true)
	case "copyOrMoveID":
		if len(arg)%2 == 0 {
			return nil, errors.New("need an odd number of arguments")
		}
		for len(arg) > 0 {
			operation, id, dest := arg[0], arg[1], arg[2]
			arg = arg[3:]
			err = f.copyOrMoveID(ctx, operation, id, dest)
			if err != nil {
				return nil, fmt.Errorf("failed moving %q to %q: %w", id, dest, err)
			}
		}
		return nil, nil
	case "exportformats":
		return f.exportFormats(ctx), nil
	case "importformats":
		return f.importFormats(ctx), nil
	case "query":
		if len(arg) == 1 {
			query := arg[0]
			var results, err = f.query(ctx, query)
			if err != nil {
				return nil, fmt.Errorf("failed to execute query: %q, error: %w", query, err)
			}
			return results, nil
		} else {

Review comment (suggestion):
I think we need to keep the "copyid" command for backwards compatibility, so I'd suggest you make this

```go
case "copyid", "moveid":
```

The command definitions will need duplicating though.


Code after:
				return nil, fmt.Errorf("couldn't find target: %w", err)
			}
			dstFs, ok = targetFs.(*Fs)
			if !ok {
				return nil, errors.New("target is not a drive backend")
			}
		}
		return f.makeShortcut(ctx, arg[0], dstFs, arg[1])
	case "drives":
		drives, err := f.listTeamDrives(ctx)
		if err != nil {
			return nil, err
		}
		if _, ok := opt["config"]; ok {
			lines := []string{}
			upstreams := []string{}
			names := make(map[string]struct{}, len(drives))
			for i, drive := range drives {
				name := fspath.MakeConfigName(drive.Name)
				for {
					if _, found := names[name]; !found {
						break
					}
					name += fmt.Sprintf("-%d", i)
				}
				names[name] = struct{}{}
				lines = append(lines, "")
				lines = append(lines, fmt.Sprintf("[%s]", name))
				lines = append(lines, "type = alias")
				lines = append(lines, fmt.Sprintf("remote = %s,team_drive=%s,root_folder_id=:", f.name, drive.Id))
				upstreams = append(upstreams, fmt.Sprintf(`"%s=%s:"`, name, name))
			}
			lines = append(lines, "")
			lines = append(lines, "[AllDrives]")
			lines = append(lines, "type = combine")
			lines = append(lines, fmt.Sprintf("upstreams = %s", strings.Join(upstreams, " ")))
			return lines, nil
		}
		return drives, nil
	case "untrash":
		dir := ""
		if len(arg) > 0 {
			dir = arg[0]
		}
		return f.unTrashDir(ctx, dir, true)
	case "copyid", "moveid":
		if len(arg)%2 != 0 {
			return nil, errors.New("need an even number of arguments")
		}
		for len(arg) > 0 {
			id, dest := arg[0], arg[1]