{"id":17861641,"url":"https://github.com/marcusbuffett/zsh-force-alias","last_synced_at":"2025-07-25T22:36:06.464Z","repository":{"id":82055977,"uuid":"65101683","full_name":"marcusbuffett/zsh-force-alias","owner":"marcusbuffett","description":"Forces the use of aliases in a zsh shell","archived":false,"fork":false,"pushed_at":"2018-07-21T03:06:15.000Z","size":31,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T13:08:29.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcusbuffett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08-06T20:55:00.000Z","updated_at":"2024-04-24T23:26:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"77b825f2-9864-4080-bcb3-804c5ac916cc","html_url":"https://github.com/marcusbuffett/zsh-force-alias","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fzsh-force-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fzsh-force-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fzsh-force-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fzsh-force-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcusbuffett","download_url":"https://codeload.github.com/marcusbuffett/zsh-force-alias/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244703729,"owners_count":20496167,"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":"2024-10-28T08:46:43.422Z","updated_at":"2025-03-20T22:31:01.550Z","avatar_url":"https://github.com/marcusbuffett.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Force zsh aliases\n\nThis is a program that will force you to use your zsh aliases. It works by installing a hook that executes before any commands. It uses a client-server architecture, each client being invidual shells and the server running in the background on port 5571.\n\n## Usage\n\nhttps://asciinema.org/a/81955\n\n## Installation\n\nFirst, install cargo, rust, and the binaries in this package (through cargo).\n```bash\ncurl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly\ngit clone https://github.com/marcusbuffett/zsh-force-alias force_alias\npushd force_alias\ncargo install --path .\npopd\nrm -rf force_alias\n```\n\nThen, add the following snippet to the bottom of your zsh file.\n\n```bash\n#####################\n## ZSH force alias ##\n(force-alias-server \u003e /dev/null \u0026) \u003e /dev/null 2\u003e\u00261\nif [[ -z \"$NO_CHECK\" ]]; then force-alias-client --init --pid $$; fi\nfunction force_alias_hook() {\n  if [[ -n \"$NO_CHECK\" ]]; then zle accept-line; return; fi\n  force-alias-client --pid $$ -- $BUFFER\n  if [[ $? -eq 1 ]]; then BUFFER=\"\"; fi\n  zle accept-line\n}\nautoload -U add-zsh-hook; zle -N force_alias_hook;\nbindkey '^J' force_alias_hook; bindkey '^M' force_alias_hook;\n## End ZSH force alias ##\n#########################\n```\n\nNow open a new shell and test it out by using a command that you have aliased, it should prevent you from executing it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusbuffett%2Fzsh-force-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcusbuffett%2Fzsh-force-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusbuffett%2Fzsh-force-alias/lists"}