feat: remote filesystem support for interactive cd#3398
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds remote filesystem support for interactive cd functionality, enabling users to interactively navigate to remote filesystems (like SFTP) using the cd command with auto-completion.
Key Changes:
- Added CWD-aware path resolution for SFTP provider to support relative paths
- Enhanced interactive
cdto pre-fill input with URL scheme for remote filesystems and callprovider::absolute()for proper path resolution - Refactored
DisplaceDoactor into a separate file for better code organization
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yazi-watcher/src/watcher.rs | Simplified watcher synchronization by always calling sync after watch/unwatch operations |
| yazi-watcher/src/local/linked.rs | Added error logging for failed canonicalization attempts |
| yazi-vfs/src/provider/sftp/sftp.rs | Enhanced absolute() to use CWD for relative path resolution with covariant scheme checking |
| yazi-vfs/src/provider/copier.rs | Performance tuning: reduced chunk size from 10MB to 5MB and increased concurrency from 3 to 4 |
| yazi-shared/src/scheme/scheme.rs | Added zeroed() convenience method for scheme port manipulation |
| yazi-shared/src/scheme/ref.rs | Reorganized methods and added with_ports() and zeroed() helpers, plus covariant() for scheme compatibility checks |
| yazi-shared/src/scheme/cow.rs | Added with_ports() and zeroed() methods with reorganized method order |
| yazi-proxy/src/mgr.rs | Made cd() and reveal() methods more flexible by accepting impl Into<UrlBuf> |
| yazi-proxy/src/cmp.rs | Made trigger() more flexible by accepting impl Into<String> |
| yazi-plugin/src/external/rga.rs | Changed to use unified_path() for remote filesystem cache directory support |
| yazi-plugin/src/external/rg.rs | Changed to use unified_path() for remote filesystem cache directory support |
| yazi-plugin/src/external/fd.rs | Changed to use unified_path() for remote filesystem cache directory support |
| yazi-config/src/popup/options.rs | Modified cd() to accept CWD parameter and pre-fill with encoded scheme for remote filesystems |
| yazi-actor/src/mgr/stash.rs | Added is_absolute() check to prevent relative URLs from being added to backstack |
| yazi-actor/src/mgr/search.rs | Added proper error notification for non-local filesystem searches |
| yazi-actor/src/mgr/mod.rs | Registered displace_do module |
| yazi-actor/src/mgr/displace_do.rs | New file: extracted DisplaceDo actor from displace.rs |
| yazi-actor/src/mgr/displace.rs | Refactored to use canonicalize() and moved DisplaceDo to separate file |
| yazi-actor/src/mgr/cd.rs | Enhanced interactive cd to support remote filesystems with proper path resolution |
| yazi-actor/src/cmp/trigger.rs | Enhanced URL parsing to support remote schemes and added CWD-aware covariant scheme handling with comprehensive tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[cfg(windows)] | ||
| #[test] | ||
| fn test_split() { | ||
| yazi_fs::init(); |
There was a problem hiding this comment.
Missing initialization call yazi_shared::init_tests() in the Windows test. The Unix test at line 115 includes this call, but the Windows test is missing it. This inconsistency could lead to test failures on Windows if the initialization is required.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Follow-up to #3396
Now the interactive
cd(g => Space by default) is working with remote filesystems, including the path auto-completion:tWIKS3ZP.mp4