{"id":21511455,"url":"https://github.com/phd/mkalias","last_synced_at":"2025-03-17T15:21:52.184Z","repository":{"id":264202491,"uuid":"892676486","full_name":"phd/mkalias","owner":"phd","description":"automatic lazy Bash completion for aliases","archived":false,"fork":false,"pushed_at":"2024-11-24T13:15:43.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T01:38:20.686Z","etag":null,"topics":["alias","aliases","bash","bash-completion","bashrc"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2024-11-22T15:05:32.000Z","updated_at":"2024-11-24T13:15:46.000Z","dependencies_parsed_at":"2024-11-22T16:34:59.455Z","dependency_job_id":null,"html_url":"https://github.com/phd/mkalias","commit_stats":null,"previous_names":["phd/mkalias"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd%2Fmkalias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd%2Fmkalias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd%2Fmkalias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phd%2Fmkalias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phd","download_url":"https://codeload.github.com/phd/mkalias/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056433,"owners_count":20390720,"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":["alias","aliases","bash","bash-completion","bashrc"],"created_at":"2024-11-23T22:08:59.916Z","updated_at":"2025-03-17T15:21:52.160Z","avatar_url":"https://github.com/phd.png","language":"Shell","readme":"mkalias\n=======\n\nAutomatic lazy Bash completion for aliases.\n\nLazy assignment of completion functions to aliases in `.bashrc` prevents Bash from loading completion functions for all\nreferenced commands at startup and taking up to several seconds to become interactive.\n\nImporting\n---------\n\nImport `mkalias.sh` in `.bashrc` or your interactive shell:\n\n``` bash\nsource /absolute/or/./relative/path/to/mkalias.sh\n```\n\nUsage\n-----\n\n```\nmkalias NAME [SYNTAX [COMMAND]]\nmkalias [-p [NAME]]\nmkalias (--help|-h)\n\n    NAME       The Name of the alias, required.\n    SYNTAX     New syntax for alias, optional.\n               If given, mkalias creates a new alias NAME for that syntax.\n               If not given, it gets the current syntax from the existing alias\n               or returns an error.\n    COMMAND    Command to complete alias like, optional.\n               If given, mkalias notifies Bash completion to complete the alias\n               like it was this command.\n               If not given, mkalias deduces the command to act as from the\n               first word of the alias' syntax.\n    -p [NAME]  Print the alias, its syntax and associated completion command.\n               With no arguments print all completion-enabled aliases.\n\n    Calling mkalias on an existing alias again will simply redefine it and/or\n    overwrite its completion settings.\n```\n\nExamples\n--------\n\nCreate a *new* alias `g` for `git` and register it for completion like the *deduced* command `git`:\n\n``` bash\n$ mkalias g git\n```\n\nCreate a *new* alias `g` for `clear \u0026\u0026 git` and register it for completion like the *explicit* command `git`:\n\n``` bash\n$ mkalias g 'clear \u0026\u0026 git' git\n```\n\nCreate a standard alias `g` for `git`.\nThen register the *existing* alias `g` for completion like the *deduced* command `git`:\n\n``` bash\n$ alias g='git'\n$ mkalias g\n```\n\nCreate a standard alias `g` for `clear \u0026\u0026 git`.\nThen register the *existing* alias `g` for completion like the *explicit* command `git`:\n\n``` bash\n$ alias g='clear \u0026\u0026 git'\n$ mkalias g '' git\n```\n\nTesting\n-------\n\nYou can test Bash completion for your newly created `git` alias `g` by typing:\n\n``` bash\n$ g stat[TAB]\n```\n\nwhich after pressing the `[TAB]` key will be completed to:\n\n``` bash\n$ g status\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphd%2Fmkalias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphd%2Fmkalias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphd%2Fmkalias/lists"}