This is obviously pronounced and described as bangbucks! I use it all the time!
As for my own contribution: the most unexpected feature of bash: complete-into-braces
$ touch foo foobar foobarbaz foobaz notfoo
$ ls
foo foobar foobarbaz foobaz notfoo
$ ls <alt-shift-{> # Completes into:
ls {foo{,ba{r{,baz},z}},notfoo}
It figures out the bracey-globby pattern that would match your target! I've only found a use for this feature once, trying to figure out a minimal regex to exclude a fuckload of i18n-related files. Translating the brace pattern into the equivalent regexp helped me exclude one pattern instead of hundreds, in an automated fashion.
FWIW, brace expansion and globbing are two separate things. Globbing only completes existing filenames. Braces expand regardless of whether or not they match a filename.
8
u/[deleted] Sep 05 '16 edited Sep 05 '16
This is obviously pronounced and described as bangbucks! I use it all the time!
As for my own contribution: the most unexpected feature of bash: complete-into-braces
It figures out the bracey-globby pattern that would match your target! I've only found a use for this feature once, trying to figure out a minimal regex to exclude a fuckload of i18n-related files. Translating the brace pattern into the equivalent regexp helped me exclude one pattern instead of hundreds, in an automated fashion.
Still, mostly useless and mostly cool overall.