zed icon indicating copy to clipboard operation
zed copied to clipboard

Support cursor parameter for zed permission lookup-resources

Open kbrwn opened this issue 10 months ago • 0 comments

Description

The zedcli currently doesn't provide a way to specify a cursor parameter when using permission lookup-resources. While the CLI supports pagination through the --page-limit flag, there's no way to manually resume pagination from a specific cursor position or to share a pagination state between different command invocations.

Desired Behavior

  • Add a --cursor flag to relevant commands (e.g., lookup-resources)
  • Support providing a cursor token as a parameter to resume pagination
  • Support outputting the last cursor with an option like --show-cursor

Example CLI Usage (Proposed)

# Get first page and show the cursor
zed permission lookup-resources document view user:user1 --page-limit 100 --show-cursor

# Resume from a specific cursor
zed permission lookup-resources document view user:user1 --page-limit 100 --cursor "MzQxODI5Mzc0ODM2NDgwMA=="

kbrwn avatar Mar 31 '25 17:03 kbrwn