-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for trashing files #165
Merged
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
03c600a
wip: skeleton code for trash adapter
stevearc 906c656
refactor: split trash implementation for mac and linux
stevearc 4edcaf6
fix: ensure we create the .Trash/$uid dir
stevearc b29e11b
feat: code complete linux trash implementation
stevearc 9aeb0dd
doc: write up trash features
stevearc cdbc791
feat: code complete mac trash implementation
stevearc e13a31f
cleanup: remove previous, terrible, undocumented trash feature
stevearc 43aa851
fix: always disabled trash
stevearc 2b97e82
feat: show original path of trashed files
stevearc 7ae2437
doc: add a note about calling actions directly
stevearc 24958a8
fix: bugs in trash implementation
stevearc 9f415bc
fix: schedule_wrap in mac trash
stevearc ab0b1f5
doc: fix typo and line wrapping
stevearc a22f448
fix: parsing of arguments to :Oil command
stevearc f7a0a90
doc: small documentation tweaks
stevearc 44727a1
doc: fix awkward wording in the toggle_trash action
stevearc 60a3f56
fix: warning on Windows when delete_to_trash = true
stevearc 35cea94
feat: :Oil --trash can open specific trash directories
stevearc f08e26b
fix: show all trash files in device root
stevearc ea88400
fix: trash mtime should be sortable
stevearc 0002f90
fix: shorten_path handles optional trailing slash
stevearc 6beec59
refactor: overhaul the UI
stevearc cdf2d71
fix: keep trash original path vtext from stacking
stevearc 4db7b78
refactor: replace disable_changes with an error filter
stevearc 5267e9e
fix: shorten path names in home directory relative to root
stevearc f6d9c02
doc: small README format changes
stevearc f0f86d8
cleanup: remove unnecessary preserve_undo logic
stevearc 13ecc84
test: add a functional test for the freedesktop trash adapter
stevearc 0ebcbf6
test: more functional tests for trash
stevearc 2e70af6
fix: schedule a callback to avoid main loop error
stevearc 97cd378
refactor: clean up mutator logic
stevearc fc731fe
doc: some comments and type annotations
stevearc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: overhaul the UI
- Loading branch information
commit 6beec596ebe0817c3a4d7de3158964abbf4bfd73
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this should show the original path of the thrashed file, but I see nothing.
This shows Oil in floating mode, but same in normal mode.
The file
gamble.xml
is in trash.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentional, but perhaps not intuitive. You're using the Linux version which has support for listing the trash files per-directory. Since you're looking at the trashed files from a specific directory, there's no point to displaying the original path. If you open the root
:Oil --trash /
it shows all trashed files, and the original path for each.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, virtual text shows up fine in root trash.
To be honest, it is pretty unintuitive (for me).
What I thought would happen is:
Now that I know how it works, it is definitely usable though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain more what you mean by "per-directory recursively downwards"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, given the following directory state (trashed files are marked with *):
Oil --trash project
showsOil --trash dirA
showsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reworked the display logic. The trash directory will now show files that were trashed from that directory, and also directories that lead to trashed files from subdirs. When you are at the root of a trash scope (the root of a device, or the filesystem root), all trashed files will be visible.
I've also changed it so that trashed files will always have virtual text that displays their original path.