fix file opening: detect binary files, fix archive paths, add context…#6
Merged
Merged
Conversation
… menu - fix Windows tar --force-local flag to prevent "Cannot connect to \C:" error when unpacking archives with drive-letter paths - add is_text_file() detection so Enter on binary files (png, exe, etc.) opens them with the OS default app instead of the text editor - add Ctrl+Enter context menu with: open with OS default, open as text in editor, view in pager, unpack archive (for archives) - add OpenContextMenu, OpenAsText, OpenWithDefault actions - update help dialog with new shortcuts - run cargo fmt for consistent formatting https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- fix context menu closing instantly by passing through Tick/Noop/Resize events instead of treating them as menu selections - fix Windows tar double-backslash issue by converting paths to forward slashes in a dedicated tar_quote() helper - expand find_sevenzip() to search well-known Windows install paths for 7-Zip, PeaZip, and NanaZip when the binary is not on PATH https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- add UnpackCommand enum (Shell for Unix, Direct for Windows) to bypass cmd /C quoting issues with spaces, parentheses, and colons in paths - add run_task_direct() that spawns programs with explicit args array instead of shell string interpolation - use PowerShell Expand-Archive for zip files on Windows instead of tar - update all tests to use UnpackCommand::display() for assertions https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- add --debug CLI flag that enables debug-level file logging to cpt.log - logger writes debug entries to file in real-time when --debug is active - add debug log statements for archive extraction (paths, commands, pane info) - add debug log statements for file type detection in explorer - refresh both panes after task completion so extracted files appear immediately - the missing refresh was causing archives to seem like they extracted to the wrong location or nowhere at all https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
…debug logs - change unpack destination from inactive pane to the archive's parent directory, matching behavior of traditional dual-pane file managers - add debug logging for task output lines and task errors - update PLAN.md to reflect new extraction destination https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- archive extraction now shows a choice dialog: [E] extract here, [F] create folder, [C] custom path - new InputMode variants: UnpackChoice and UnpackCustomPath - new files (from copy, move, extract) are highlighted with new_file_fg color until the cursor lands on them or the app restarts - add new_file_fg (LightGreen) to Theme struct (26 fields now) - theme editor supports the new field under Explorer section - update help screen with extraction options, highlighting info, --debug flag docs, and log file location - update PLAN.md with new-file highlighting and debug mode sections - add 16 new tests (8 UnpackChoice key mapping, 8 highlighting/theme) https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
i1rr
added a commit
that referenced
this pull request
Apr 24, 2026
fix file opening: detect binary files, fix archive paths, add context…
i1rr
added a commit
that referenced
this pull request
Apr 24, 2026
fix file opening: detect binary files, fix archive paths, add context…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.