Hacker News new | ask | show | jobs
by pehtis 1883 days ago
I will never understand why "Show all filename extensions" is unchecked by default in Finder.
6 comments

It's also unchecked in Windows by default - I suspect that in reality the concept of extensions probably confuses some users, who end up changing the extension and then struggle to work out how to open their saved files.

( I always prefer to see the extensions too though :) )

Windows gives you a big warning when you change the extension, which seems to me both sufficient and better than hiding the extension altogether (which, like URL hiding, is a fairly dangerous and largely unnecessary convenience)
It works exactly the same way in macOS Finder as in Windows Explorer. Extensions are hidden by default. You can enable to show extensions (either by individual file, or globally). If a file has it's extension shown, you will get a confirmation prompt warning you of the consequences by changing the file extension.
I've learned to never underestimate users' ability to shoot themselves in the foot. People will click through any popup dialogue which might suggest that their decision to perform an action was wrong.
because most of them are clearly fearmongering by ms, apple et al, scaring you into staying subscribed to their particular product. If they abuse their own warning systems, why should we respect them?
The warning is a massive inconvenience. It reverts the file name if you cancel, so if you spent any effort on the new name, it will be wasted. Moreover, people often expect to change the file type by changing the name, and they get confused when it doesn't work (or it works for them in some case and they expect it will work here too). Lastly, users often don't read error messages, let alone understand them ("file extension" is hardly an easy concept...), so it's not necessarily helpful to them. Really, the number of cases where you'd need to change a file extension are so small compared to when you don't that I completely understand why they made this choice. It's imperfect, but I don't know of a better solution.
Users are well-trained to ignore warnings.
Like browsers, file navigation UIs could also just grey out the file extension.
Isn't it also confusing for the average user when they end up with identical looking files? I didn't realize that macOS had per-file extension hiding until I synced some images over from my iPad. I ended up with files that I couldn't tell apart at a glance because they had the same name but were different image file types. I'm now torn if I actually want to force all extensions to show because I think showing applications as "Foo.app" is ugly (I know, it's a stupid reason to dislike the option...)
Nothing stops you from putting the same label on multiple boxes in real life.
This is an outdated mindset. Literally everyone knows the difference between .docx and .jpg in 2021.
You're living in a beautiful bubble.
Is there any way to turn this off only for applications? Or even just in the applications directory? I find it irrationally annoying that everything in the applications folder shows the ".app" extension.
If you use the dashboard app switcher (iirc the F3 or F4 key), it hides .app in that list, it has a search field and I believe it accepts drag-and-drops.

That’s not exactly an answer to your question, but there’s a chance it’s an acceptable solution, so duly noted.

It's F4 on my MacBook Pro 2018 Catalina. :)
Genuine question, does MacOS actually care about file extensions? I would guess not, though there are probably some compatibility features that will do things if they are there.
Yes it cares. If you rename a folder to folder.app then it will change to look and "behave" like an app. Or if you change the extension of a video file to mp3 you'll loose the icon preview.

Finder does try to help with renaming and when you try to rename a file only the filename is selected and not the extension.

What you're describing is just Finder caring. Linux doesn't care at all about your file extensions but Nautilus sure does.

In GNOME for example gio handles opening files in the "correct" application by way of the MIME database in /usr/share/application/mimeapps.list and ~/.local/share/applications/mimeapps.list.

LaunchServices definitely cares about extensions. The Mac OS has a strange history with extensions (classic Macs didn't really support them, but they were still a common convention), but file extensions are more than a browser-level construct.
I was under the impression that unless a file contains some other metadata (most don't), that the extension is the way the OS chooses which app to use to open it.
Unix-based has almost always used internal metadata, and the "dot" is just another character. I thought Windows was unique in relying on the suffixes, but Wikipedia suggests MacOS inherited some form from NextSTEP.
"Unix" OSes in my experience simply don't (universally) have a way to "open this file in the correct application". It's a foreign concept. Files are just sequences of bytes, and file paths are just addresses to those bytes. The file extensions are, then, purely for the sake of the user, as there is no (standard) way to store file metadata. There are specific filesystems with these metadata extensions, but otherwise, you need to resort to commands like file and libmagic for heuristics on determining file-type.

Or just use the file suffix, which is AFAIK what all the mainstream Linux desktop environments do, through Freedesktop's MIME implementation. I don't know if it supports using metadata or file magics instead, but a quick glance shows almost every MIME definition uses file globbing.

You can check this in the files located at "/usr/share/mime/application" and "/usr/share/mime/packages" on most distros. Most (all?) definitions use a "glob pattern" to match files.

I wonder if filesystems should be designed to store the MIME type alongside the file. Web browsers get MIME types alongside the data (and they do make use of that info).
OSX does care, but classic Mac OS didn't used to. It had a separate resource fork that described what the file was, and after that you could name it anything you liked.
Yes. Take a JPEG with extension. It opens fine. Get a file with .jfif macOS doesn't know what the hell it is. Same file format, weird extension. (For some reason twitter was saving files as .jfif for a while)
Unchecked by default is fine, what bothers me a lot is that it's impossible to display filename extensions on iOS/iPadOS.
Or how to navigate to /Users/<username>. You have to manually add it to the sidebar from Preferences.
That part is so perplexing. Apple wants you to use that folder! Multiple useful things are stored in it, but you have to jump through hoops to go do it. It should be added as a favourite by default.
Same on windows