You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the most general running scenario involving a pattern
rargs -p <pattern><cmd>
I'm unsure whether it makes sense to run cmd no matter if the pattern is matched ; but at least I can tell that it is not always what I expect from Rargs.
Take for instance the common scenario when some files, e.g.
1. Some name
10. Another name
need to be renamed like
01. Some name
10. Another name
There, I wish I was able to type
ls |rargs -p '^(\d\..*)' -- mv "'{1}'""'0{1}'"
but it wouldn't currently work since Rargs would execute mv for both files, instead of the first one only.
The text was updated successfully, but these errors were encountered:
@lotabout, thanks for your comment.
Sure, there are plenty of alternatives here, including command-line tools dedicated to file renaming.
I was hoping that I could count on Rargs in cases like that, because I keep it in my personal toolkit, and the smaller the kit the more likely I am to actually use them efficiently.
Your solution makes sense, but I'd find it cumbersome to leverage, compared with using Rargs only.
Hi and happy new year,
Given the most general running scenario involving a pattern
I'm unsure whether it makes sense to run
cmd
no matter if the pattern is matched ; but at least I can tell that it is not always what I expect from Rargs.Take for instance the common scenario when some files, e.g.
need to be renamed like
There, I wish I was able to type
but it wouldn't currently work since Rargs would execute mv for both files, instead of the first one only.
The text was updated successfully, but these errors were encountered: