Skip to content

Instantly share code, notes, and snippets.

@binki
Created November 21, 2016 15:05
Show Gist options
  • Select an option

  • Save binki/2ce295c3a8a5848d1f71426fa1bf62c0 to your computer and use it in GitHub Desktop.

Select an option

Save binki/2ce295c3a8a5848d1f71426fa1bf62c0 to your computer and use it in GitHub Desktop.
[email protected]’s conditional globbing is weird
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ mkdir -p a/{b{0,1,2,3},\*\*}/c
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ find . -name node_modules -prune -or -print
.
./a
./a/**
./a/**/c
./a/b3
./a/b3/c
./a/b2
./a/b2/c
./a/b1
./a/b1/c
./a/b0
./a/b0/c
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ nohup npm install [email protected] >/dev/null 2>&1
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ node_modules/.bin/rimraf 'a/**/c'
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ find . -name node_modules -prune -or -print
.
./a
./a/**
./a/b3
./a/b3/c
./a/b2
./a/b2/c
./a/b1
./a/b1/c
./a/b0
./a/b0/c
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ node_modules/.bin/rimraf 'a/**/c'
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $ find . -name node_modules -prune -or -print
.
./a
./a/**
./a/b3
./a/b2
./a/b1
./a/b0
ohnobinki@gibby /tmp/.private/ohnobinki/asdf $
@binki
Copy link
Author

binki commented Nov 21, 2016

And that is another excuse for my wrapper, rimraf-noglob, to exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment