{"id":18910002,"url":"https://github.com/jonasbn/bash_completion_defaultbrowser","last_synced_at":"2026-04-28T15:36:32.496Z","repository":{"id":136289344,"uuid":"155612147","full_name":"jonasbn/bash_completion_defaultbrowser","owner":"jonasbn","description":"Bash completion for the defaultbrowser tool for MacOS","archived":false,"fork":false,"pushed_at":"2023-12-22T19:19:58.000Z","size":5,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T09:07:05.261Z","etag":null,"topics":["bash","command-line","completion","hacktoberfest","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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":null,"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}},"created_at":"2018-10-31T19:26:25.000Z","updated_at":"2024-07-11T14:34:36.000Z","dependencies_parsed_at":"2024-11-08T09:40:15.809Z","dependency_job_id":"5eeafc1e-6116-441f-9c19-035e6631adf9","html_url":"https://github.com/jonasbn/bash_completion_defaultbrowser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jonasbn/bash_completion_defaultbrowser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_defaultbrowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_defaultbrowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_defaultbrowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_defaultbrowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/bash_completion_defaultbrowser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_defaultbrowser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bash","command-line","completion","hacktoberfest","shell"],"created_at":"2024-11-08T09:38:56.309Z","updated_at":"2026-04-28T15:36:29.053Z","avatar_url":"https://github.com/jonasbn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# defaultbrowser Bash Completion\n\nBash completion for the [`defaultbrowser`](https://github.com/kerma/defaultbrowser) tool for MacOS\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Introduction\n\nThe completion implementation requires `defaultbrowser` to be installed (of course), Tt uses the `defaultbrowser` built-in feature of listing all available browsers by not providing as$ argument.\n\n```bash\n$ defaultbrowser\n  iterm2\n* chrome\n  firefoxdeveloperedition\n  safari\n  vlc\n  evernote\n  netnewswire\n```\n\n## Usage\n\n```bash\n$ defaultbrowser \u003ctab\u003e\u003ctab\u003e\nchrome                   iterm2                   vlc\nevernote                 netnewswire\nfirefoxdeveloperedition  safari\n```\n\n## Download\n\n```bash\n$ curl https://raw.githubusercontent.com/jonasbn/bash_completion_defaultbrowser/master/defaultbrowser \u003e defaultbrowser\n```\n\n## Installation\n\nWhen downloaded you have to install the completion implementation. Where your completions are located might vary.\n\n### Personal\n\nIf you want to install them for your personal use, do the following.\n\nCreate the file: `~/.bash_completion`, containing the code below:\n\n```bash\nfor bcfile in ~/.bash_completion.d/* ; do\n  . $bcfile\ndone\n```\n\nRef: [ServerFault.com: _Standard place for user defined bash_completion.d scripts?_](https://serverfault.com/questions/506612/standard-place-for-user-defined-bash-completion-d-scripts)\n\nCreate a directory for your completions:\n\n```bash\n$ mkdir ~/.bash_completion.d\n```\n\nCopy your completions into the newly created directory:\n\n```bash\n$ cp defaultbrowser ~/.bash_completion.d/\n```\n\nStart a new shell and you should be good to go.\n\n### System-wide example from Debian\n\nBased on [an introduction](https://debian-administration.org/article/316/An_introduction_to_bash_completion_part_1) to `bash` completions on Debian.\n\n```bash\n$ sudo cp defaultbrowser /etc/bash_completion.d/\n```\n\n### System-wide example from OSX\n\nThis assumes you are using **Homebrew**\n\nDo note that paths vary based on whether you are using `bash` 3 or 4\n\n#### `bash` 3\n\nFormula: `bash-completions`.\n\n```bash\n$ cp defaultbrowser /usr/local/etc/bash_completion.d/\n```\n\nAnd to activate right away:\n\n```bash\n$ source  /usr/local/etc/bash_completion.d/defaultbrowser\n```\n\n#### `bash` 4\n\nFormula: `bash-completions2`.\n\n```bash\n$ cp defaultbrowser /usr/local/share/bash-completion/completions/\n```\n\nAnd to activate right away:\n\n```bash\n$ source /usr/local/share/bash-completion/completions/defaultbrowser\n```\n\n## Motivation\n\nI just discovered `defaultbrowser` [today](http://jonasbn.github.io/til/osx/change_default_browser_from_cli.html), since I needed a tool, which does exactly THAT - with this tab completion, it is even easier to use.\n\n## History\n\n- 1.0.0\n  - Initial version working with `defaultbrowser`.\n\n## See Also\n\nA more elaborate piece of documentation on `bash` completions is available from **The Linux Documentation Project** in the [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/tabexpansion.html).\n\nFrom the [GNU Documentation](https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html).\n\nGood two-part article, \"An Introduction to Bash Completion\": [Part 1](https://debian-administration.org/article/316/An_introduction_to_bash_completion_part_1) and [Part 2](https://debian-administration.org/article/317/An_introduction_to_bash_completion_part_2).\n\nPlease note that this experimental implementation has only been tested with `bash` version 3 (see version 1.0.0).\n\nVersions after version 1.0.0 have been tested with `bash` version 4.\n\nThe most comprehensive collection of `bash` completions I have come across is [the one](https://github.com/scop/bash-completion) from the **Debian Linux distribution**. It is also the one offered for OSX via **Homebrew**.\n\n## References\n\n- [GitHub: kerma/defaultbrowser](https://github.com/kerma/defaultbrowser)\n- [Today I Learned: Change Default Browser From the Command Line](http://jonasbn.github.io/til/osx/change_default_browser_from_cli.html)\n\n## License\n\nThis is made available under the MIT license, see separate license file.\n\n## Copyright\n\n:copyright: jonasbn 2018\n\n:copyright: [defaultbrowser](https://github.com/kerma/defaultbrowser) Margus Kerma, MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fbash_completion_defaultbrowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fbash_completion_defaultbrowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fbash_completion_defaultbrowser/lists"}