copyfiles icon indicating copy to clipboard operation
copyfiles copied to clipboard

Alternative to copyfiles compatible with both linux and windows?

Open FredericLatour opened this issue 5 years ago • 7 comments

Does anybody know an alternative to this tool that is compatible with both linux and windows? I've spent hours and hours because of weird behaviors with linux and I'm afraid that even if I could find an immediate solution, i might be bitten with an edge case at a later time.

FredericLatour avatar Oct 03 '19 22:10 FredericLatour

I came here looking for the same, I'm getting different copy behavior between Ubuntu and Windows.

Ubuntu: image

Windows: image

sondreb avatar Jul 27 '21 16:07 sondreb

I fixed my issue by escaping the search pattern, had similar issue previously with different shell and OS. Depending on if you quote or not, it might differ how and what is resolving the glob you enter.

So doing something like \"ui/dist/**/*\" will help.

https://github.com/calvinmetcalf/copyfiles/issues/61

sondreb avatar Jul 27 '21 16:07 sondreb

yes double quotes are needed on globs in windows (and thats probably something that's going to affect other libraries too)

On Tue, Jul 27, 2021 at 12:54 PM SondreB @.***> wrote:

I fixed my issue by escaping the search pattern, had similar issue previously with different shell and OS. Depending on if you quote or not, it might differ how and what is resolving the glob you enter.

So doing something like "ui/dist/**/*" will help.

#61 https://github.com/calvinmetcalf/copyfiles/issues/61

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/calvinmetcalf/copyfiles/issues/75#issuecomment-887673818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITRHYFCZGCNH76WFGQGXDTZ3QF5ANCNFSM4I5IZCXA .

-- -Calvin W. Metcalf

calvinmetcalf avatar Jul 28 '21 19:07 calvinmetcalf

It depends on both OS and shell, in my example I was using pwsh (Powershell Core) on Ubuntu, where it failed. Worked fine on Windows. I have been bit by this behavior multiple times in my devops work =)

sondreb avatar Jul 28 '21 19:07 sondreb

I'm interested in the original question as well, anyone know of a good alternative 🙂? (having some other issues with it, and would rather not spend more time on it)

rujorgensen avatar Jun 29 '22 15:06 rujorgensen

the the real issue ends up being how shells interpret things before it even gets to this (or any other) library so there may not be a library that does what you want

calvinmetcalf avatar Jul 05 '22 13:07 calvinmetcalf

this is mostly fixed with double quotes

calvinmetcalf avatar Jul 05 '22 14:07 calvinmetcalf