zfzf icon indicating copy to clipboard operation
zfzf copied to clipboard

Refine behavior when cursor is in the middle of a path

Open b0o opened this issue 2 years ago • 0 comments

In the case that the cursor isn’t at the end of a path:

/usr/local/foo/bar
          ^
          cursor

The current behavior is to use the full path as the zfzf target. Other options include:

  • Only use the left-hand side (lhs), then re-append the right-hand side (rhs) after selection
  • Ignore the rhs
  • Use the lhs as the target, but only show subdirectories of the lhs that contain the path on the rhs (either as a direct or distant descendant). Similar to /usr/local/**/foo/bar.

Ideally, zfzf intelligently picks the option that makes the most sense based on context. And/or we could add new parameters to explicitly specify the desired behavior.

b0o avatar Aug 24 '21 21:08 b0o