{"id":27996685,"url":"https://github.com/python-cmd2/cmd2-abbrev","last_synced_at":"2025-05-08T21:48:52.735Z","repository":{"id":49665825,"uuid":"134913460","full_name":"python-cmd2/cmd2-abbrev","owner":"python-cmd2","description":"Plugin for cmd2 to support old abbreviation behavior","archived":false,"fork":false,"pushed_at":"2021-06-11T07:07:34.000Z","size":27,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T21:48:49.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/python-cmd2.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-25T23:27:03.000Z","updated_at":"2020-02-21T22:51:40.000Z","dependencies_parsed_at":"2022-09-10T18:51:29.582Z","dependency_job_id":null,"html_url":"https://github.com/python-cmd2/cmd2-abbrev","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmd2%2Fcmd2-abbrev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmd2%2Fcmd2-abbrev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmd2%2Fcmd2-abbrev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-cmd2%2Fcmd2-abbrev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-cmd2","download_url":"https://codeload.github.com/python-cmd2/cmd2-abbrev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154954,"owners_count":21862618,"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":[],"created_at":"2025-05-08T21:48:51.426Z","updated_at":"2025-05-08T21:48:52.622Z","avatar_url":"https://github.com/python-cmd2.png","language":"Python","readme":"# cmd2-abbrev\n\n## Description\n\nPlugin for cmd2 to support previously deprecated abbreviation behavior.\n\nAdds a setting `abbrev` which allows users to control whether commands\ncan be abbreviated. If an application has a `speak` command:\n```\n(Cmd) speak hello\nhello\n```\nthen any unique prefix of any command will run the command:\n```\n(Cmd) set abbrev True\nabbrev - was: False\nnow: True\n(Cmd) sp hello\nhello\n```\n\nNon-unique abbreviations generate a syntax error:\n```\n(Cmd) s hello\n*** Unknown syntax: s hello\n(Cmd) help\n\nDocumented commands (type help \u003ctopic\u003e):\n========================================\nalias  help     load  pyscript  set    shortcuts  unalias\nedit   history  py    quit      shell  speak\n```\n\n## Installation\n\nSystem requirements: works anywhere `cmd2` works (Windows, Linux, MacOS).\nRequires `cmd2` version 0.9.12 or higher.\n\nInstall using pip:\n```\n$ pip install cmd2-abbrev\n```\n\nAdd to your `cmd2` application by mixing in the `AbbrevMixin` class:\n```python\nimport cmd2\nimport cmd2_abbrev\n\nclass AbbrevExample(cmd2_abbrev.AbbrevMixin, cmd2.Cmd):\n    \"\"\"A cmd2 program to demonstrate the use of the cmd2_abbrev plugin\"\"\"\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n```\n\nYou must mix in `AbbrevMixin` before `cmd2.Cmd` or it won't work properly.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-cmd2%2Fcmd2-abbrev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-cmd2%2Fcmd2-abbrev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-cmd2%2Fcmd2-abbrev/lists"}