-
-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't batch rename files which names start with dash '-' #1818
Comments
The same would go for |
The fix looks simple. So there's no point in not doing the correct thing, IMO. |
Yes, please raise the PR. Also check for other places in the code where it may be an issue. We should fix this in plugins too. |
I found that a similar functionality exists in the |
So the fix is not strictly necessary in those cases, but it doesn't hurt them either. Just smack on a
Also, fair point. Those pipelines have zero documentation to their name other than "they do what they do". I should write something for that when I get some more time. |
See #1820 |
Environment details (Put
x
in the checkbox along with the information)Linux boak 6.6.13-gentoo #1 SMP PREEMPT_DYNAMIC Sat Jan 27 13:31:22 MSK 2024 x86_64 AMD Ryzen 5 3600 6-Core Processor AuthenticAMD GNU/Linux
NNN_PLUG="p:preview-tui" NNN_FCOLORS="030304020707060805050501" NNN_PAGER="cat"
nnn
master (5b05c8b)Yeah, okay, let's go formal, here is the log:
Click to expand
Exact steps to reproduce the issue
Let's say I have a file with the name starting with a dash. I've created one with the following command:
Then I fire up
nnn
, hitr
to invoke batch rename, which opens up my lovelynvim
, remove the dash from the file's name, hit save and exit aaand... nothing changed: I see the file is still there named as "-file". If I quit NNN, then I am faced with the following message in the terminal:It looks to me that the double dash
--
options separator may be useful in themv
invocation of batch rename function. If I add it in the source code like this:then it just werks, no problem, any file starting with a dash gets renamed correctly. But this is Linux, I mean, this is
mv
fromcoreutils
package, and NNN supports a plethora of other stuff like OSX, *BSD, Haiku and others. Do they all have double dash options separator for themv
command? I don't know. It probably needs some testing.The text was updated successfully, but these errors were encountered: