Skip to content
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

Add wildcard support to cp #192

Closed
r12f opened this issue Aug 18, 2021 · 5 comments
Closed

Add wildcard support to cp #192

r12f opened this issue Aug 18, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@r12f
Copy link

r12f commented Aug 18, 2021

Feature Description

Currently cp doesn't support wildcard. With wildcard support, it will make copying multiple files much easier.

Describe The Solution You'd Like

Say, we can an folder which contains a.exe, a.pdb, b.exe and b.pdb, and we would like to copy the exe file into a folder named bin, while pdb file into a folder named symbols.

Currently this is what we needs to do:

cp a.exe bin/a.exe
cp b.exe bin/b.exe
cp a.pdb symbols/a.pdb
cp b.pdb symbols/b.pdb

With wildcard support, it will be much easier:

cp *.exe bin/
cp *.pdb symbols/

Code Sample

Code sample is the same as above.

@sagiegurari sagiegurari added the enhancement New feature or request label Aug 18, 2021
sagiegurari added a commit that referenced this issue Sep 13, 2021
@sagiegurari
Copy link
Owner

@r12f this is now implemented in the 0.8.5 branch. you can see a new command called glob_cp (also cp_glob) that can be used.

see api doc:
https://github.com/sagiegurari/duckscript/blob/0.8.5/docs/sdk.md#std__fs__CPGlob

would love some feedback if you have any

@sagiegurari
Copy link
Owner

this is now released so i'll close the issue, but feel free to reopen if something doesn't work out or create new issues.
thanks a lot for the idea.

@r12f
Copy link
Author

r12f commented Sep 13, 2021

Awesome! Thanks a lot! And may I use it in cargo-make now? I will definitely upgrade and try it out.

@sagiegurari
Copy link
Owner

it should work, but im going to release a new cargo make in a few hours.

@sagiegurari
Copy link
Owner

@r12f might postpone the cargo-make release, but if you reinstall cargo-make it should pick up the latest duckscript version and should hopefully work.
if you have an issue with that, just open/reopen an issue. I would love to get some feedback if it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants