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

Option to delete dotfiles #6

Closed
callumlocke opened this issue Mar 21, 2016 · 4 comments
Closed

Option to delete dotfiles #6

callumlocke opened this issue Mar 21, 2016 · 4 comments

Comments

@callumlocke
Copy link

I expected del ./** to clear my current working directory, but it leaves dotfiles intact.

Can this be changed, or a flag be added to allow deleting dotfiles?

@schnittstabil
Copy link
Collaborator

I do not know why, but:

del ./* --dot # works
del --dot ./* # does not

@callumlocke NB: del ./** also tries to remove the working directory. If you want that, you have to run del --force ./** --dot.

@callumlocke
Copy link
Author

hmm, just tried --dot but it has no effect for me.

I can't see dot anywhere in the code: https://github.com/sindresorhus/del-cli/blob/master/cli.js

are you sure there's a --dot flag?

@schnittstabil
Copy link
Collaborator

The option is passed through del: cli.flags (and node-glob)

This should also work: These work for me:

$ find
# .
# ./.hidden

$ del ./* --dot
$ del --dot=true ./* # works too

$ find
# .

On Windows you may have to escape the pattern:

del --dot=true "./*"

@SamVerschueren
Copy link

Closing this as the solution provided by @schnittstabil works. If you still experience issues, don't hesitate to respond.

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