Skip to content

Docs: what rename actually accepts - #61

Merged
aloth merged 1 commit into
aloth:mainfrom
Wang-Chuming:docs/rename-scope
Nov 2, 2026
Merged

aloth merged 1 commit into
aloth:mainfrom
Wang-Chuming:docs/rename-scope

Conversation

@Wang-Chuming

Copy link
Copy Markdown
Contributor

What

SKILL.md shows this as an example of the mv alias:

olcli mv chapters/draft.tex chapters/intro.tex   # alias

The command cannot do that. rename resolves the source (a path works there) and then takes the new name as a bare name, so:

  • olcli rename archive/probe.txt probe.txt succeeds and moves the entity to the project root;
  • any destination containing / fails with 400 invalid element name, reproduced from the project root and from a subfolder;
  • so there is no one-step way to move a file into a folder.

Change

  • Fix the example so it no longer claims a cross-folder move.
  • State the scope of rename and give the workaround that does work:
    olcli upload <file> --to <new path> followed by olcli delete <old path>.
  • CHANGELOG entry under Unreleased → Documentation.

Docs only; no behavior change. Happy to turn the underlying limitation into an issue or a code change (accepting a path and creating the folder) if you would rather fix it than document it.

SKILL.md showed `olcli mv chapters/draft.tex chapters/intro.tex` as an
example of the alias. rename takes a bare name, not a path: the entity keeps
its content and lands in the project root under the new name, and a
destination containing / is rejected with HTTP 400 ("invalid element name").
So the documented move between folders is not something the command can do.

Spell out that scope and give the workaround that does work: upload the file
to the new path, then delete the old one.
@aloth
aloth merged commit f4397f2 into aloth:main Nov 2, 2026
2 checks passed
@aloth

aloth commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Thanks, merged. The mv example was indeed broken. One correction: a plain rename keeps the entity in its folder rather than moving it to the project root, so that paragraph is rewritten in 0.15.3.

0.15.3 also makes mv actually move: olcli mv sub/x.txt chapters/x.txt uses Overleaf's move endpoint and creates missing folders, olcli mv sub/x.txt chapters/ keeps the name, and / is the project root. Credited in the CHANGELOG.

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.

2 participants