Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sxyazi
Copy link
Owner

@sxyazi sxyazi commented Oct 3, 2025

Fixes #2104 (comment)

When running the shell command in an empty directory, the value of $0 becomes a "sh" string, and $@ becomes an empty array, even if files are selected in other directories.

With this PR, when in an empty directory (no hovered file), $0 will be an empty string (""), and $@ will correctly contain the array of selected file paths - to fix this issue, the behavior of $0 in empty directories has been changed from "sh" to "".

The issue was originally introduced in 2efda75 ($0 was first supported), since then $0 has never worked correctly, so this change should not break anything

@sxyazi sxyazi changed the title fix: incorrect $0 and $@ parameters in shell command under empt… fix: incorrect $0 and $@ parameters in shell command under empty directories Oct 3, 2025
@sxyazi sxyazi merged commit d8b0425 into main Oct 3, 2025
6 checks passed
@sxyazi sxyazi deleted the pr-3ee9a32c branch October 3, 2025 09:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2025
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.

open, rename and remove do not do anything if there is no hovered item

2 participants