{"id":16307755,"url":"https://github.com/rkitover/sh-prompt-simple","last_synced_at":"2026-04-28T16:04:40.114Z","repository":{"id":50608965,"uuid":"443145784","full_name":"rkitover/sh-prompt-simple","owner":"rkitover","description":"Simple, fast, nice looking and colorful prompt for busybox/(d)ash/ksh/bash/zsh with Git branch, optional Git status indicator and exit status. Much faster than other Git prompts on MSYS2/Cygwin/WSL.","archived":false,"fork":false,"pushed_at":"2024-09-06T04:08:51.000Z","size":2189,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T10:12:28.467Z","etag":null,"topics":["ash","bash","busybox","dash","git","ksh","prompt","sh","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/rkitover.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-12-30T17:46:20.000Z","updated_at":"2024-09-06T04:08:54.000Z","dependencies_parsed_at":"2024-01-07T21:04:18.350Z","dependency_job_id":"a8854797-ae57-490d-a617-62bfd7e5000d","html_url":"https://github.com/rkitover/sh-prompt-simple","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/rkitover%2Fsh-prompt-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkitover%2Fsh-prompt-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkitover%2Fsh-prompt-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkitover%2Fsh-prompt-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkitover","download_url":"https://codeload.github.com/rkitover/sh-prompt-simple/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241880285,"owners_count":20035932,"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":["ash","bash","busybox","dash","git","ksh","prompt","sh","zsh"],"created_at":"2024-10-10T21:15:13.686Z","updated_at":"2026-04-28T16:04:40.058Z","avatar_url":"https://github.com/rkitover.png","language":"Shell","funding_links":[],"categories":["Themes"],"sub_categories":["ZSH on Windows"],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [sh-prompt-simple](#sh-prompt-simple)\n  - [installation](#installation)\n  - [configuration](#configuration)\n    - [SPS_STATUS](#sps_status)\n    - [SPS_ESCAPE](#sps_escape)\n    - [SPS_WINDOW_TITLE](#sps_window_title)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## sh-prompt-simple\n\n![how the prompt looks in a\nwindow](/screenshots/sh-prompt-simple-demo.png?raw=true)\n\nThis is a simple, lightweight, and nice looking prompt that runs quickly\neven in very slow shells like MSYS2, Cygwin and WSL.\n\nIt shows the short name of the current environment (distribution, OS, etc.,) the\ngit branch when in a git checkout, the last command exit status (green checkmark\nfor success and red X mark for non-zero exit) and an optional clean/dirty git\nstatus indicator.\n\nThis prompt is compatible with bash, zsh and some other POSIX sh\nimplementations such as busybox, (d)ash, ksh, etc..\n\nIt's based on the [Solarized\nExtravagant](https://github.com/magicmonty/bash-git-prompt/blob/master/themes/Solarized_Extravagant.bgptheme)\ntheme in [bash-git-prompt](https://github.com/magicmonty/bash-git-prompt).\n\nI also made a [PowerShell version of this\nprompt](https://gist.github.com/rkitover/61b85690896e29b42897b99c2486477c).\n\n### installation\n\n```shell\nmkdir -p ~/source/repos\ncd ~/source/repos\ngit clone https://github.com/rkitover/sh-prompt-simple\n```\n\nSomewhere in your shell startup file such as `~/.bashrc` put something like this:\n\n```bash\nSPS_STATUS=1\n. ~/source/repos/sh-prompt-simple/prompt.sh\n```\n. For bash I also recommend:\n\n```bash\nshopt -s checkwinsize\nPROMPT_COMMAND='history -a'\n```\n.\n\n### configuration\n\n#### SPS_STATUS\n\nTo show a clean/dirty git status indicator, set this variable:\n\n```bash\nSPS_STATUS=1\n```\n. This is disabled by default because it makes the prompt much slower on things\nlike MSYS2/Cygwin, but it will work fine on Linux. You can also try it on\nMSYS2/Cygwin and see if the slowdown is acceptable for you.\n\nYou can turn it on or off without re-sourcing any files, so if it's\nparticularly slow in a large repository you can just do:\n\n```bash\nunset SPS_STATUS\n```\n\n, to turn it off.\n\nIt may be particularly slow when entering a repository, but after that it will\nbe cached and the prompt will be much faster.\n\n#### SPS_ESCAPE\n\nThe prompt tries to detect bash/busybox/(d)ash/ksh and use zero-width escape\nsequences if found. If your shell does not support the `\\[ ... \\]` zero-width\nescape sequences, for example because you didn't turn on the fancy prompt\nfeature in busybox, you can turn them off by setting:\n\n```bash\nSPS_ESCAPE=0\n```\n, or force them on with:\n\n```bash\nSPS_ESCAPE=1\n```\n. If you have a wide enough window, the prompt will work more or less ok without\nthe escape sequences in shells that don't support them.\n\n#### SPS_WINDOW_TITLE\n\nBy default the window title is set to the domain of the host or the hostname if\non a local network (only two full hostname parts, such as `machine.localnet`.)\nTo turn this off set:\n\n```bash\nSPS_WINDOW_TITLE=0\n```\n. This is a work in progress and I plan to expand this feature to allow for\ncomplex window titles using formats and evaluated variables/commands.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkitover%2Fsh-prompt-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkitover%2Fsh-prompt-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkitover%2Fsh-prompt-simple/lists"}