{"id":13638136,"url":"https://github.com/anki-code/xontrib-argcomplete","last_synced_at":"2025-04-09T20:12:41.071Z","repository":{"id":40541221,"uuid":"293516093","full_name":"anki-code/xontrib-argcomplete","owner":"anki-code","description":"Argcomplete support to tab completion of python and xonsh scripts in xonsh shell. ","archived":false,"fork":false,"pushed_at":"2024-12-26T15:40:26.000Z","size":350,"stargazers_count":31,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T20:12:34.512Z","etag":null,"topics":["argcomplete","python","shell","xonsh","xontrib"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anki-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://github.com/anki-code","https://www.buymeacoffee.com/xxh","https://github.com/xonsh/xonsh#the-xonsh-shell-community"]}},"created_at":"2020-09-07T12:01:55.000Z","updated_at":"2025-04-03T05:23:54.000Z","dependencies_parsed_at":"2025-01-18T04:53:31.412Z","dependency_job_id":null,"html_url":"https://github.com/anki-code/xontrib-argcomplete","commit_stats":{"total_commits":115,"total_committers":5,"mean_commits":23.0,"dds":0.08695652173913049,"last_synced_commit":"81727753bcf8c97e43f7f83a034a0b6f5dbc9439"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-argcomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-argcomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-argcomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anki-code%2Fxontrib-argcomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anki-code","download_url":"https://codeload.github.com/anki-code/xontrib-argcomplete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"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":["argcomplete","python","shell","xonsh","xontrib"],"created_at":"2024-08-02T01:00:40.638Z","updated_at":"2025-04-09T20:12:41.045Z","avatar_url":"https://github.com/anki-code.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/kislyuk/argcomplete\"\u003eArgcomplete\u003c/a\u003e support for python and xonsh scripts in \u003ca href=\"https://xon.sh\"\u003exonsh\u003c/a\u003e shell.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e  \nIf you like the idea click ⭐ on the repo and and \u003ca href=\"https://twitter.com/intent/tweet?text=Nice%20xontrib%20for%20the%20xonsh%20shell!\u0026url=https://github.com/anki-code/xontrib-argcomplete\" target=\"_blank\"\u003etweet\u003c/a\u003e.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e  \n\u003cimg src=\"https://raw.githubusercontent.com/anki-code/xontrib-argcomplete/master/static/xontrib-argcomplete-demo.png\" alt=\"[Demo]\"\u003e\u003cbr /\u003e\n\u003csup\u003e\u003ci\u003eScreenshot made with \u003ca href=\"https://github.com/anki-code/xontrib-prompt-bar\"\u003exontrib-prompt-bar\u003c/a\u003e and \u003ca href=\"https://konsole.kde.org/\"\u003eKonsole\u003c/a\u003e.\u003c/i\u003e\u003c/sup\u003e\n\u003c/p\u003e\n\n## Install\n```shell script\nxpip install xontrib-argcomplete\necho 'xontrib load argcomplete' \u003e\u003e ~/.xonshrc\n# Reload xonsh\n```\n\n## Usage\n\nFirst of all you need to [add the argcomplete support to your script](https://kislyuk.github.io/argcomplete/#synopsis):\n* The `PYTHON_ARGCOMPLETE_OK` marker should be found in the first 10 lines of the file ([example](https://github.com/anki-code/xontrib-argcomplete/blob/37e24660351780501eed64a2a77cb2a3309c109c/tests/proto.py#L2)).\n* Additional `.completer` was set for `add_argument` ([example](https://github.com/anki-code/xontrib-argcomplete/blob/37e24660351780501eed64a2a77cb2a3309c109c/tests/proto.py#L7)).\n* `argcomplete.autocomplete(parser)` added before `parser.parse_args()` ([example](https://github.com/anki-code/xontrib-argcomplete/blob/37e24660351780501eed64a2a77cb2a3309c109c/tests/proto.py#L8)).\n\nExample for [`proto.py`](https://github.com/anki-code/xontrib-argcomplete/blob/master/tests/proto.py) sample:\n```xsh\nxpip install xontrib-argcomplete\nxontrib load argcomplete\n\ncd /tmp \u0026\u0026 git clone https://github.com/anki-code/xontrib-argcomplete\ncd xontrib-argcomplete/tests\n\npython proto.py \u003cTab\u003e  # Suggestions: --help --proto -h\n./proto.py --proto tt\u003cTab\u003e  # Suggestions: http https\n./proto.xsh --proto tt\u003cTab\u003e  # Suggestions: http https\n./proto --proto tt\u003cTab\u003e  # Suggestions: http https\n\n$PATH.append($PWD)\nproto --proto tt\u003cTab\u003e  # Suggestions: http https\n```\n\nThe argcomplete xonsh completer will be activated with this cases:\n```xsh\npython script.py \u003cTab\u003e\n./script.py \u003cTab\u003e\n./path/script.py \u003cTab\u003e\n\nxonsh script.xsh \u003cTab\u003e\n./script.xsh \u003cTab\u003e\n./path/script.xsh \u003cTab\u003e\n\n# scripts without extension should have \"env python\" or \"env xonsh\" or path to python/xonsh in the shebang\n./script \u003cTab\u003e\nscript \u003cTab\u003e    # script should be found in $PATH\n```\n\n## Known issues\n\nWindows is not supported. PRs are welcome!\n\n## Development\n* To switch on the debug mode run `$XONTRIB_ARGCOMPLETE_DEBUG = True`.\n* [Argcomplete environment variables](https://github.com/kislyuk/argcomplete/issues/319#issuecomment-693295017)\n* [Argcomplete documentation](https://kislyuk.github.io/argcomplete/)\n\n## Links \n* This package is the part of [ergopack](https://github.com/anki-code/xontrib-ergopack) - the pack of ergonomic xontribs.\n* This package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter).\n","funding_links":["https://github.com/anki-code","https://www.buymeacoffee.com/xxh","https://github.com/xonsh/xonsh#the-xonsh-shell-community"],"categories":["Tab-completions"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanki-code%2Fxontrib-argcomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanki-code%2Fxontrib-argcomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanki-code%2Fxontrib-argcomplete/lists"}