Skip to content

Conversation

@latiagertrutis
Copy link

@latiagertrutis latiagertrutis commented Jul 2, 2025

Description of the issue

When yanking marked files into the same directory the expected behavior is to be prompted with a list of options. Instead an error occurs:

DIRVISH[yank]: source and target are the same file <file>

Cause

The first condition of the cond function checks if the src and dest are equal, then an if function that checks for symlink method is called and it's else branch returns an error if not.

When yanking a file into the same directory src is always equal to dest but the method is not any of the symlink, thus causing the if to always fall into the else branch and exiting with error.

Solution

Do not prompt for an error, just create a condition for the cond function that checks that src == dest AND method == symlink.

Proposed feature in this PR

I found this while trying to create duplicates of a file, I saw this is not implemented, so embedded to this PR there is a proposal for adding a "duplicate file" option in the yank menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant