5 ms·
MacOS doesn't even hijack what you want it to hijack. I have to set every .sh I make to open in text edit manually, and I still sometimes get prompts to search
by asdff 7y ago
MacOS doesn't even hijack what you want it to hijack. I have to set every .sh I make to open in text edit manually, and I still sometimes get prompts to search the app store for an app to deal with these spooky .sh files even with textedit listed as default on the right click menu.
- Hackbraten 7y agoI’ve used the `duti` CLI for a while to set defaults per file type; never had any issues since. https://github.com/moretension/duti https://github.com/moretension/duti (or `brew install duti`)
- codetrotter 7y agoNote that macOS has two different kinds of default application associations. The first one, the one that you might expect to apply to all files of the same kind, but which actually applies only to the specific file you are doing this for, is under “Open With” in the context menu that comes up when you right click the file (two finger touch by default on MacBook laptops). When you choose Open With > Other and check the “Always Open With” checkbox, you are only creating an association for the file in question, not for the file format in general. This to me is confusing. In order to create the association for the file type and not just a specific file, you need to instead select the “Get Info” entry in the context menu for the file. Then, under “Open with” in the window that comes up, this is where you select the application that will apply to all files of same kind. Did you try the latter method?
- whiskeykilo 7y agoAs someone who grew up on Windows when I initially started working on a Mac daily this drove me absolutely nuts. It could be worded much better. The way Finder sets the default view is equally unintuitive
- vbezhenar 7y agoBeing able to associate a particular file with application instead of all files of the given type might be handy feature.
- Mikhail_Edoshin 7y agoIn old days Mac OS files had two properties: file type and creator type. File type could be like "TEXT" and creator type was a unique code for the application that created it (they were registered at Apple, I believe). All this was purely internal, users never saw such things: Mac file names normally didn't have an "extension", it was just "1995 Report" or something. As a result it behaved like that: - When you opened a file, it opened in the program that created it. - When there were no such program, you could still open it in another program that claimed to understand these files. I don't remember how it was implemented, I think there was a dialog asking if one would like to use another program with some choice (probably the first one that fit). This was rather handy with formats like "Encapsulated Postscript" in desktop publishing: this format supported both vector and raster images, but one normally used different applications to manipulate them. This stayed for some time after the move to Mac OS X, but now I believe these things are gone or not used at all.
- airstrike 7y agoHowever useful, I have a feeling that is more likely to be the exception rather than the rule and should therefore be prioritized accordingly
- threeseed 7y agoI don't see how Apple could've made it any easier. 1) Select any file. 2) Change the app in the "Open with" dropdown. 3) If you want it to apply to all files click the "Change all" button.
- hombre_fatal 7y agoThe fact that the upstream HN comment has to explain two identical-sounding options that do different things should help you see what's wrong with the current impl. Your steps don't work with the "Open With -> Options" context menu like they point out, but rather only with the "Get Info -> Open With" options. Not the best UX. For example, I can imagine if there were instead two radio buttons in "Open With": "Always for this file", "Always for this extension". All in one place.
- delusional 7y agoThe concept of file extensions on windows is equally unintuitive (why is the type 9f.file dictated by what comes after a dot). It's just a question of what you're used to.
- int_19h 7y agoFile extensions are the de facto type indicator on all platforms, not just Windows. Even when the FS has some other way to specify the type (e.g. a separate MIME type metadata field), the extension still normally sets the default value for that. This is orthogonal to all that, though. It's about the UX to associate an app with a file type, regardless of how that file type is determined.
- gvjddbnvdrbv 7y agodoesn't Linux use libmagic?
- actsof 7y agoWhat you're referring to as Linux is actually... GNU/Linux doesn't automatically choose which program to use for anything (you can't ./file.png like you can in Windows). In my experience file managers tend to use file extensions to choose which application to use, and that application might then use libmagic and ignore the file extension. (e.g. giving a PNG file the .JPG extension will make the file manager think it's a JPEG, and therefore open it with an image viewer, but the image viewer program will use headers to recognise it as a PNG)
- gvjddbnvdrbv 7y agoxdg-open ./file.png
- ljm 7y agoI love how, once you install Xcode, it becomes the default editor for a load of plain text formats. Yes Apple, I really do need to boot up a full blown, 7GB+ sized IDE to edit some markdown. Apparently TextEdit wasn't good enough.
- anthk 7y agoGet plan9port for OSX, forget XCode, Vi, Emacs. Set it up accordingly, you won't go back. Acme under OSX shines.
- ljm 7y agoSpeaking to my heart. I had Acme set up but it needs a good mouse to make it work. I use a trackball mouse, it doesn't have the three finger chords. Fucking love the concept, but it'd take a lot of work to get the immersiveness of modern systems. e.g. completion/suggestions, linting, etc. none of it is built for plan9. Ironic because plan9 is amazingly trackball friendly.
- anthk 7y agoacme2k has keybindings too, you can use these instead of chords https://github.com/karahobny/acme2k https://github.com/karahobny/acme2k
- anthk 7y agoAlso, if you code in Go: https://github.com/jmigpin/editor https://github.com/jmigpin/editor It diverges somehow from Acme, but it has autocomplete and a similar interface. I love it :)
- greglindahl 7y agoIf you aren't outraged that emacs or vi aren't the default, are you sure you're a typical HN reader?!
- mjcohen 7y agoThe outrage is that you can't change from Xcode. I use macdown for mathjax files for math.stackexchange.com, and I have to use "open with" to choose macdown every time.