{"id":18909982,"url":"https://github.com/jonasbn/macaliaser","last_synced_at":"2026-02-10T02:04:49.959Z","repository":{"id":13860011,"uuid":"16557772","full_name":"jonasbn/macaliaser","owner":"jonasbn","description":"script for building bash aliases for applications on MacOS","archived":false,"fork":false,"pushed_at":"2025-01-31T11:26:47.000Z","size":109,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T09:07:06.286Z","etag":null,"topics":["aliases","bash","macos","osx","perl","shell","tool"],"latest_commit_sha":null,"homepage":"https://jonasbn.github.io/macaliaser/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonasbn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-02-05T20:46:40.000Z","updated_at":"2024-08-14T04:46:02.000Z","dependencies_parsed_at":"2023-11-26T09:21:55.218Z","dependency_job_id":"ea029772-fe40-4530-a6d1-1c0ac7ba8b60","html_url":"https://github.com/jonasbn/macaliaser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonasbn/macaliaser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fmacaliaser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fmacaliaser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fmacaliaser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fmacaliaser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/macaliaser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fmacaliaser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29288767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"online","status_checked_at":"2026-02-10T02:00:07.935Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aliases","bash","macos","osx","perl","shell","tool"],"created_at":"2024-11-08T09:38:53.167Z","updated_at":"2026-02-10T02:04:49.931Z","avatar_url":"https://github.com/jonasbn.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# macaliaser\n\nmacaliaser - script to create aliases for applications on OSX / MacOS\n\n# FEATURES\n\n- generation of aliases MacOS applications for shell use\n- black listing og applications for alias generation\n\n# SYNOPSIS\n\n    # Generate aliases in /Applications directory\n    $ macaliaser -i /Applications\n\n    # Generate aliases in /Applications directory and Applications directory in users home directory\n    $ macaliaser -i /Applications $HOME/Applications\n\n    # help message\n    $ macaliaser -h\n\n    # Serialize the generated aliases to a file in you home directory\n    $ macaliaser -i /Applications \u003e ~/.aliases\n\n# DESCRIPTION\n\nThis script create aliases from all the applications in the directories you scan.\n\nThe recommended usage is to put the aliases in a separate file and use\nthe from you preferred shell.\n\nI have the following line in my `.bash_profile`\n\n    source \"$HOME/.aliases\"\n\nSo the script can proces the file with out conflicting with other `bash`\nsettings, apart from the `.bash_profile` change, I have added the\nfollowing line to my `crontab`\n\n    0 12 * * 1 $HOME/bin/macaliaser -i /Applications/ \\\n    $HOME/Applications/ \u003e $HOME/.aliases\n\nDo note that `cron` is not necessarily running under the same shell as the user\nso in order to get a proper path set for useful alias suggestions, you might have\nto tweak the environment and emulate a user shell session, like so:\n\n    0 12 * * 1 . $HOME/.bash_profile; $HOME/bin/macaliaser -i /Applications/ \\\n    $HOME/Applications/ \u003e $HOME/.aliases\n\nThis sources the shell (bash in this case) resource file prior to execution.\nSee [Stack Overflow](https://stackoverflow.com/questions/2229825/where-can-i-set-environment-variables-that-crontab-will-use)\n\n### Black Listing\n\nYou can enable black listing of applications by adding a file named:\n`blacklist` to `$HOME/.config/macaliaser/blacklist` like this example:\n\n    /Users/jonasbn/Applications/Chrome Apps.localized/Default \\\n    pjkljhegncpnkpknbcohdijeoejaedia.app\n\nDo note that the spaces are not escaped.\n\n## OPTIONS\n\n- -i (index)\n\n    This indexes the directories listed after `--` or provided as arguments to `-i`\n\n- -v (verbosity)\n\n    This outputs informative messages to `STDERR` so you can filter it from the generated\n    data, which is printed to `STDOUT`\n\n# FUNCTIONS\n\n## is\\_app\n\nThis checks whether a file has a name in the format:\n\n    «name».app\n\nDo note that names can contain spaces and this is handled.\n\nIf this is true it processes the entry further SEE **suggest**.\n\n## suggest\n\n**suggest** suggest different aliases for your applications, each\nsuggestion is tested for existance by **is\\_cmd**, which relies on [File::Which](https://metacpan.org/pod/File::Which),\nso we do not overrule any existing commands (like `mail`).\n\nThe tries are done in the following order:\n\n1. lowercase, name without .app extension, example: `imovie`\n2. lowercase, name with .app extension, example: `mailapp`\n3. uppercased first letter with .app extension\n4. the original name\n\n## cmd\\_exist\n\n**cmd\\_exists** check whether there already is a command with the\nsuggested alias in path.\n\nThis uses [File::Which](https://metacpan.org/pod/File::Which)'s `which` subroutine, which works like the shell command \u0026lt;which\u003e\n\n## create\\_alias\n\n**create\\_alias** is used to create the actual alias, based on the suggestions\nfrom **suggest**.\n\nAlias are actually just strings in the form of:\n\n    alias somealias=\"open -a /some/path/to/an/app\"\n\n# REFERENCES\n\n- [MetaCPAN: File::Which](https://metacpan.org/pod/File::Which)\n- [MacOS man page: open command](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/open.1.html)\n- [MacOS man page: bash, contains information on alias command](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/bash.1.html)\n\n# ISSUE REPORTING\n\n# AUTHOR\n\n- jonasbn \u003cjonasbn@cpan.org\u003e\n\n# DEVELOPMENT\n\nIf you want to contribute to `macaliaser` please read the [Contribution guidelines](https://github.com/jonasbn/macaliaser/blob/master/CONTRIBUTING.md)\nand follow [the pull request guidelines](https://github.com/jonasbn/macaliaser/blob/master/.github/PULL_TEMPLATE.md).\n\n# COPYRIGHT\n\nmacaliaser is (C) 2004-2018 Jonas B. Nielsen (jonasbn)\n\u003cjonasbn@cpan.org\u003e\n\n# LICENSE\n\nmacaliaser is free software and is released under the Artistic\nLicense 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fmacaliaser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fmacaliaser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fmacaliaser/lists"}