Skip to content

feat(fullscreen): add Duplicate option to file context menu#83

Merged
KrisPowers merged 2 commits into
masterfrom
feat/duplicate-file
Jun 30, 2026
Merged

feat(fullscreen): add Duplicate option to file context menu#83
KrisPowers merged 2 commits into
masterfrom
feat/duplicate-file

Conversation

@KrisPowers

Copy link
Copy Markdown
Member

Summary

  • Adds a Duplicate entry to the file explorer right-click menu (files only, not folders)
  • Generates the copy name as <name> copy.ext, incrementing to <name> copy 2.ext, <name> copy 3.ext, etc. if the name is already taken
  • After the copy completes, the rename input opens automatically on the new file so the user can rename it immediately
  • Adds fs.copy IPC op to the C++ backend (std::filesystem::copy with recursive and copy_symlinks options), with a matching declaration in fileops.hpp

Test plan

  • Right-click a file in the sidebar and confirm Duplicate appears in the menu
  • Clicking Duplicate creates <name> copy.ext in the same folder and opens the inline rename input
  • Duplicating when <name> copy.ext already exists produces <name> copy 2.ext, and so on
  • Files without an extension (Makefile, Dockerfile) get <name> copy as the copy name
  • Pressing Escape in the rename input cancels the rename but leaves the copied file in place
  • Directories do not show the Duplicate option

Closes #75

Right-clicking a file now shows Duplicate. It copies the file in the
same directory with a copy suffix, then immediately opens the rename
input so the user can give it a proper name without a second step.

Backend: adds fs.copy IPC op backed by std::filesystem::copy with
recursive and copy_symlinks options.

Closes #75
@KrisPowers KrisPowers changed the title feat(sidebar): add Duplicate option to file context menu feat(fullscreen): add Duplicate option to file context menu Jun 30, 2026
@KrisPowers KrisPowers merged commit 79447b3 into master Jun 30, 2026
26 checks passed
@KrisPowers KrisPowers deleted the feat/duplicate-file branch June 30, 2026 21:08
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.

Sidebar: no Copy File or Duplicate File option

1 participant