2 ms·
Not only is parameter expansion delightfully esoteric, it can replace sed for many applications. Or, as you’ve done, inverse basename. Since it’s a shell built
by sgarland 3y ago
Not only is parameter expansion delightfully esoteric, it can replace sed for many applications. Or, as you’ve done, inverse basename.
Since it’s a shell built-in, it avoids the overhead of exec. Ever wonder why asdf is slow? Go peek at the source code. This is why. I have a draft PR that fixes it, but there are still some failing tests I need to fix.
- Twey 3y agoHmm, I only see a little bit of bash in asdf, but it's mostly wrappers that I don't expect to have much impact on performance? E.G. https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/make-asdf.sh https://gitlab.common-lisp.net/asdf/asdf/-/blob/master/make-... I always assumed asdf is mostly pure CL…
- twic 3y agoPresumably https://github.com/asdf-vm/asdf https://github.com/asdf-vm/asdf
- forgotpwd16 3y agoReplacing external program calls such as usual sed usage with shell (including bash specific) built-ins was also core in neofetch's design when was made as alternative to screenfetch. Will say that checking dylanaraps, someone worthy to be called a bash wizard, programs is a nice way to learn how to do complex shell scripting.