News for hackers. Stuff that matters.
Re: by user3939382 on Wednesday December 21, 2022 @05:19PM (#34087157)
I was just commenting to a friend how annoying it is that macOS aliases can't add flags to executables like you can easily do in Windows shortcuts since, what? Windows 95?

If you want to launch Chrome with flags through your dock/UI you have to compile an AppleScript to an .app. It's crazy.

Re: by cerved on Wednesday December 21, 2022 @05:37PM (#34087325)
I don't use osx but surely you can create aliases just like in Linux and BSD?
Re: by user3939382 on Wednesday December 21, 2022 @06:16PM (#34087659)
Nope. macOS aliases suck. It’s a binary unmodifiable file that can only point to a file, it can’t specify anything additional.
Re: by DangitBobby on Wednesday December 21, 2022 @06:33PM (#34087820)
Is there a reason you can't add a script to your path and alias that?

    #!/usr/bin/env bash
    my-command --flag --another-flag $@
Re: by varenc on Wednesday December 21, 2022 @06:48PM (#34087931)
As far as I know, you can’t get an executable script like that to act like an app that’s launchable when double clicked from Finder or clicked the Dock. Even though it’s executable.
Re: by DangitBobby on Wednesday December 21, 2022 @06:51PM (#34087956)
I just tried it, seems to work! Make your script with custom options, mark it as executable, make an alias for it within finder, and drag that into your dock.
Re: by battles on Wednesday December 21, 2022 @10:01PM (#34089217)
You can create a folder with a '.app' extension and put the script in there. Just make sure the script is executable with chmod and remove the '.sh' extension.
Re: by DangitBobby on Wednesday December 21, 2022 @06:28PM (#34087765)
Bash aliases (or whatever shell you are using) work exactly the same.