{"id":18909968,"url":"https://github.com/jonasbn/bash_completion_perlbrew","last_synced_at":"2025-10-07T16:13:06.691Z","repository":{"id":17649283,"uuid":"59916296","full_name":"jonasbn/bash_completion_perlbrew","owner":"jonasbn","description":"Basic bash completion for perlbrew","archived":false,"fork":false,"pushed_at":"2025-01-20T18:27:12.000Z","size":97,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T05:27:19.538Z","etag":null,"topics":["bash","bash-completion","hacktoberfest","perlbrew"],"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":"2016-05-28T22:05:56.000Z","updated_at":"2025-01-20T18:27:13.000Z","dependencies_parsed_at":"2024-08-20T07:11:56.128Z","dependency_job_id":"de788fb4-4443-4469-8472-d874ea48f9ed","html_url":"https://github.com/jonasbn/bash_completion_perlbrew","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_perlbrew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_perlbrew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_perlbrew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbash_completion_perlbrew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/bash_completion_perlbrew/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239898462,"owners_count":19715212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","bash-completion","hacktoberfest","perlbrew"],"created_at":"2024-11-08T09:38:49.892Z","updated_at":"2025-10-07T16:13:01.639Z","avatar_url":"https://github.com/jonasbn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Perlbrew Bash Completion\n\nBasic tab completion for [perlbrew](https://perlbrew.pl/).\n\n![Shellcheck Action](https://github.com/jonasbn/bash_completion_perlbrew/workflows/Shellcheck%20Action/badge.svg)\n![Spellcheck Action](https://github.com/jonasbn/bash_completion_perlbrew/workflows/Spellcheck%20Action/badge.svg)\n![Markdownlint Action](https://github.com/jonasbn/bash_completion_perlbrew/workflows/Markdownlint%20Action/badge.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n## Usage\n\nThis completion script, executes `perlbrew list` and offers completions for all the `perlbrew` perls and libraries installations you have available.\n\n```bash\n$ perlbrew use \u003ctab\u003e\nperl-5.10.1\nperl-5.20.2\nperl-5.20.2@workflow\n...\n```\n\nAnd the `bash` completion functionality even assists, when you specify more of your targets\n\n```bash\n$ perlbrew use perl-5.20\u003ctab\u003e\nperl-5.20.2\nperl-5.20.2@workflow\n...\n```\n\n## Download\n\n```bash\n$ curl https://raw.githubusercontent.com/jonasbn/bash_completion_perlbrew/master/perlbrew \u003e perlbrew\n```\n\n## Installation\n\nWhere 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 perlbrew ~/.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 perlbrew /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 (Formula: `bash-completions`)\n\n```bash\n$ cp perlbrew /usr/local/etc/bash_completion.d/\n```\n\nAnd to activate right away:\n\n```bash\n$ source  /usr/local/etc/bash_completion.d/perlbrew\n```\n\n#### `bash` 4 (Formula: `bash-completions2`)\n\n```bash\n$ cp perlbrew /usr/local/share/bash-completion/completions/\n```\n\nAnd to activate right away:\n\n```bash\n$ source /usr/local/share/bash-completion/completions/perlbrew\n```\n\n## Motivation\n\nI have a huge list of `perlbrew` library installations and I tend to keep the names long and descriptive, so it seemed like tab completion was an interesting alternative to the _flow breaking copy-pasting_ and error prone typing away.\n\nThe programmatic capabilities of `bash` are truly powerful and useful and can be put to good use in use-cases like this.\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.\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## License\n\nThis is made available under the MIT license, see separate license file.\n\n## Copyright\n\n:copyright: jonasbn 2016-2020\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fbash_completion_perlbrew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fbash_completion_perlbrew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fbash_completion_perlbrew/lists"}