Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sedatk
· 3y ago · 0 comments
"echo *" just prints "*" on bash unfortunately.
Comments
[–]
bryanlarsen
3y ago
That's its behaviour in an empty directory, but it works for me on a non-empty directory.
[–]
sedatk
OP
3y ago
Oh, you're right. Never occurred to me that my home folder would be empty.
[–]
hulitu
3y ago
I presume you don't have a "modern desktop" installed. Hell, even Firefox spams $HOME with "Downloads".
[–]
sedatk
OP
3y ago
You're right, it's WSL; so, just dotfiles.
[–]
raldi
3y ago
What version of bash do you see this happening on? Mine works as expected.
[–]
sedatk
OP
3y ago
I happened to try it in a directory with only dotfiles apparently.
[–]
tp34
3y ago
shopt -s dotglob
[–]
seanhunter
3y ago
Yes. Or one lowtech method I use often is `touch ~/-i`. When someone tries to rm -rf * the file called “-i” gets globbed at the front of the arguments and the subsequent command goes into “interactive “ mode meaning it prompts y/n for each file
[–]
tpoacher
3y ago
Nice! Great "bug as a feature" trick!