Skip to content

feat(drive): add --all flag to ls for global file listing#107

Merged
steipete merged 2 commits intoopenclaw:mainfrom
struong:feat/drive-ls-all
Mar 3, 2026
Merged

feat(drive): add --all flag to ls for global file listing#107
steipete merged 2 commits intoopenclaw:mainfrom
struong:feat/drive-ls-all

Conversation

@struong
Copy link
Copy Markdown
Contributor

@struong struong commented Jan 25, 2026

Summary

Adds an --all (alias --global) flag to gog drive ls that lists all accessible files instead of being scoped to a specific folder.

Closes #108

Motivation

Currently drive ls always filters by parent folder (defaulting to root). To list files globally, users must use drive search which requires a search query. This makes it cumbersome to simply list recent files across all of Drive.

Changes

  • Added All bool field to DriveLsCmd with --all/--global flags
  • Added buildDriveAllListQuery() that builds a query without parent folder constraint
  • Updated DriveLsCmd.Run() to use the appropriate query builder based on the flag
  • Added unit tests for the new function

Usage

# List all accessible files (not just root folder)
gog drive ls --all --max 20

# Combine with query filter
gog drive ls --all --query "mimeType='application/pdf'"

@struong
Copy link
Copy Markdown
Contributor Author

struong commented Jan 25, 2026

hey @steipete appreciate your time, can I get maintainer approval to run any pending workflows?

CleanShot 2026-01-25 at 15 58 33@2x

@struong
Copy link
Copy Markdown
Contributor Author

struong commented Feb 4, 2026

bump @steipete

@visionik
Copy link
Copy Markdown
Collaborator

Hi @struong I'll look at this this weekend. Thank you.

@visionik
Copy link
Copy Markdown
Collaborator

visionik commented Mar 2, 2026

This looks good, thank you @struong ... I'll be reviewing PR's actively to help Peter, this one took a while to get to and so your PR has conflicts with main; could you please rebase on the latest main? I'll merge it then.

@steipete steipete force-pushed the feat/drive-ls-all branch from 1f6da02 to ced43a5 Compare March 3, 2026 05:01
@steipete steipete merged commit 9eb4212 into openclaw:main Mar 3, 2026
2 of 5 checks passed
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Mar 3, 2026

Landed via temp rebase onto main.

Thanks @struong!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(drive): add --all flag to ls for global file listing

3 participants