{"id":27255584,"url":"https://github.com/bric3/nice-exit-code","last_synced_at":"2025-04-11T02:20:15.295Z","repository":{"id":48967419,"uuid":"21179375","full_name":"bric3/nice-exit-code","owner":"bric3","description":"ZSH plugin that maps exit status code to human readable string","archived":false,"fork":false,"pushed_at":"2020-01-17T07:25:44.000Z","size":5,"stargazers_count":37,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-15T13:23:21.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bric3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-24T20:16:51.000Z","updated_at":"2023-12-31T07:50:10.000Z","dependencies_parsed_at":"2022-08-12T19:51:21.406Z","dependency_job_id":null,"html_url":"https://github.com/bric3/nice-exit-code","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/bric3%2Fnice-exit-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bric3%2Fnice-exit-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bric3%2Fnice-exit-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bric3%2Fnice-exit-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bric3","download_url":"https://codeload.github.com/bric3/nice-exit-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328338,"owners_count":21085298,"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-04-11T02:20:14.632Z","updated_at":"2025-04-11T02:20:15.288Z","avatar_url":"https://github.com/bric3.png","language":"Shell","readme":"nice-exit-code plugin for oh-my-zsh\n===================================\n\n[oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) plugin that maps exit status code to human readable string.\n\nFor example : \n\nWarning (`1`) : \n\n```bash\n~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯ git pull origin master:master\nFrom github.com:bric3/nice-exit-code\n ! [rejected]        master     -\u003e master  (non-fast-forward)\n↪ WARN ~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯\n```\n\nCommand no found (`127`) :\n\n```bash\n~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯ fail\nzsh: command not found: fail\n↪ CNOTFOUND ~/.oh-my-zsh-custom/plugins/nice-exit-code ± ❯\n```\n\nInterrupted (`130`)\n\n```bash\n...\n* d4eb1c2 - (grin/master) adds grin config (2014-06-21 22:37:14 +0200) Brice Dutheil \u003cbrice.dutheil@gmail.com\u003e\n* 9447ccb - Adds oh-my-git PR link (2014-06-18 18:07:43 +0200) Brice Dutheil \u003cbrice.dutheil@gmail.com\u003e\n\n↪ INT ~ ○ ❯\n```\n\n\nThere's no real specifications for status codes, however some are commonly admitted for most programs, the mapping is inspired by [this script](https://github.com/Valodim/zsh-prompt-powerline/blob/master/hooks/prompt-exitnames.zsh)\n\nThis function replaces the exit status number with its associated signal name name. Note we can't know for sure if these return codes are actually caused by the signals, but usually they are, since few programs output exit codes superior to `128` for error conditions.\nIf no matching codes then output the raw code.\n\n## Install it\n\nThis install assume the current shell is ZSH with oh-my-zsh already installed.\n\nInstall a clone of this repository in oh-my-zsh plugin custom folder. *Note it is possible to change the default custom directory of oh-my-zsh by redefining the $ZSH_CUSTOM in the .zshrc *\n\n```bash\nmkdir -p $ZSH_CUSTOM/plugins\ngit clone git@github.com:bric3/nice-exit-code.git $ZSH_CUSTOM/plugins/nice-exit-code\n```\n\nThis will make oh-my-git available as a plugin for oh-my-zsh. Now you still need to activate it. In your .zshrc just activate the plugin by adding oh-my-git to the plugins variable :\n\n```\nplugins=(\n # custom plugins\n nice-exit-code\n oh-my-git\n\n # bundled plugins\n git\n osx\n mosh\n ...\n```\n\nThen to use it in a theme just add `$(nice_exit_code)` anywhere in your ZSH shell prompt.\n\n```bash\nPROMPT='$(nice_exit_code) %n@%m \u003e '\n```\n\n","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbric3%2Fnice-exit-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbric3%2Fnice-exit-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbric3%2Fnice-exit-code/lists"}