Skip to content

feat: remote filesystem support for interactive cd#3398

Merged
sxyazi merged 1 commit intomainfrom
pr-926c46d0
Dec 3, 2025
Merged

feat: remote filesystem support for interactive cd#3398
sxyazi merged 1 commit intomainfrom
pr-926c46d0

Conversation

@sxyazi
Copy link
Owner

@sxyazi sxyazi commented Dec 3, 2025

Follow-up to #3396

Now the interactive cd (g => Space by default) is working with remote filesystems, including the path auto-completion:

tWIKS3ZP.mp4

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 cd to pre-fill input with URL scheme for remote filesystems and call provider::absolute() for proper path resolution
  • Refactored DisplaceDo actor 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();
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@sxyazi sxyazi merged commit c6e03e9 into main Dec 3, 2025
16 checks passed
@sxyazi sxyazi deleted the pr-926c46d0 branch December 3, 2025 09:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants