Another "recent" (much more recent IIRC) change is that you don't need the dot anymore in find to search in the current directory.
extract() {
bsdtar -xf "$1"
}
you can decompress things which are not files, such as stdin or device files. in addition, your code does not cover *.tar.xz (more common than tar.bz2 nowadays), or lzma, or lz4, or tar.zst, or many many other formats. further, it's not even consistent: bunzip2, gunzip, and unxz remove the input file, but tar, unrar, 7z, and zstd do not.Personally, I consciously avoid using the internal decompression features of tar, both out of habit and to avoid unexpected results.
As such, I generally use command lines like: bunzip2 -c <tar.bz2 file> |tar xvf -
instead of relying on tar xvjf
I don't see it as wrong or bad to use tar's decompression features, it's more about my own preferences and experience. Being able to perform similar actions in multiple ways is one of the things I've always appreciated about the shell and the Unix/GNU userland.
Anyway, my advice to you and anyone else having trouble with tar is that "tar caf" and "tar xaf" are the only things most people need to remember about tar, with or without compression.
(In this case, most people means people who use tar, but so rarely that they have trouble remembering how to use it; they probably never use it for anything else other than (un)archiving. Also, xkcd isn't gospel.)
I gave up and added this to my .bashrc: