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

Rethink how URLs and the destination path are provided #13

Open
uncenter opened this issue Jul 27, 2024 · 3 comments
Open

Rethink how URLs and the destination path are provided #13

uncenter opened this issue Jul 27, 2024 · 3 comments

Comments

@uncenter
Copy link
Contributor

I find that cloneit x y z is more intuitive than cloneit x,y,z. A destination path would then be provided through a flag instead of as the second argument (--output or --dest maybe?).

As I'm writing this, I've actually thought of another possible solution: take the last argument (assuming there are 2 or more arguments provided), check if it is a URL (parse it and check if it has a certain protocol), if it is, download as normal, if not, interpret it as the destination path.

@uncenter uncenter changed the title Pass multiple URLs as multiple arguments instead of comma separated Rethink how URLs and the destination path are provided Jul 27, 2024
@alok8bb
Copy link
Owner

alok8bb commented Jul 27, 2024

As I'm writing this, I've actually thought of another possible solution: take the last argument (assuming there are 2 or more arguments provided), check if it is a URL (parse it and check if it has a certain protocol), if it is, download as normal, if not, interpret it as the destination path.

This sounds good, I didn't like the --path or passing any extra flag for cloning the directory. And cloneit <url1> <url2> <directory> will be more intuitive as you said, so we can go with this approach.

@shihaamabr
Copy link

cloneit x y z makes more sense because other tools like cp, mv has the same style..

@alok8bb
Copy link
Owner

alok8bb commented Jul 27, 2024

Hmm.. but then last argument can be a directory or url, it'll get confusing for someone new I think. We can also keep --path as optional, but again that'll mess up everything.
I really don't know which way is actually better in this situation, but passing directory without a flag seems simple and easy enough.

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

No branches or pull requests

3 participants