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

How to download just a folder but not creating a parent directory? #18

Open
Kritiqual opened this issue Nov 21, 2024 · 2 comments
Open

Comments

@Kritiqual
Copy link

For example, I want to download Sweet-cursors folder
I used this command:

gh download EliverLara/Sweet -b nova kde/cursors/Sweet-cursors

But instead only Sweet-cursors folder, the result is as below:

kde
 \__cursors		
		\__Sweet-cursors

Can you help me on this?

@yuler
Copy link
Owner

yuler commented Nov 22, 2024

The default will reserved repo dir path, but you can use the the --outdir option to specify a directory

For example:

gh download https://github.com/EliverLara/Sweet/tree/nova/kde/cursors/Sweet-cursors --outdir Sweet-cursors

It will only remove kde/cursors prefix

gh download https://github.com/EliverLara/Sweet/tree/nova/kde/cursors/Sweet-cursors --outdir otherdir

With rename Sweet-cursors to otherdir

You can use --dry-run to output the information to help you confirm before you download

@Kritiqual
Copy link
Author

Thanks, this works!

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

2 participants