{"id":16651165,"url":"https://github.com/cbefus/nice_prompt","last_synced_at":"2026-04-19T14:34:06.350Z","repository":{"id":5430530,"uuid":"6622775","full_name":"cbefus/nice_prompt","owner":"cbefus","description":"A simple to use, fully functional (includes date, time, user, host, cwd, git status, and virtual env), .bash_profile for your bash prompt.","archived":false,"fork":false,"pushed_at":"2019-10-17T22:17:25.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T08:27:05.156Z","etag":null,"topics":["bash","color","git","prompt","ps1","virtualenv"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/cbefus.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}},"created_at":"2012-11-10T00:41:20.000Z","updated_at":"2021-05-27T23:48:06.000Z","dependencies_parsed_at":"2022-07-06T17:32:39.900Z","dependency_job_id":null,"html_url":"https://github.com/cbefus/nice_prompt","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/cbefus%2Fnice_prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2Fnice_prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2Fnice_prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbefus%2Fnice_prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbefus","download_url":"https://codeload.github.com/cbefus/nice_prompt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243238974,"owners_count":20259132,"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":["bash","color","git","prompt","ps1","virtualenv"],"created_at":"2024-10-12T09:23:58.971Z","updated_at":"2026-04-19T14:34:06.313Z","avatar_url":"https://github.com/cbefus.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"NICE PROMPT\n===========\n```\n  _   _ _           ______                          _\n | \\ | (_)          | ___ \\                        | |\n |  \\| |_  ___ ___  | |_/ / __ ___  _ __ ___  _ __ | |_\n | . ` | |/ __/ _ \\ |  __/ '__/ _ \\| '_ ` _ \\| '_ \\| __|\n | |\\  | | (_|  __/ | |  | | | (_) | | | | | | |_) | |_\n \\_| \\_/_|\\___\\___| \\_|  |_|  \\___/|_| |_| |_| .__/ \\__|\n                                             | |\n By Chad R. Befus                            |_|\n ```\n ================\n\nA simple to use, fully functional, (includes date, time, user, host, cwd, git status, and virtual env) .bash_profile for your bash prompt.\n\nThis prompt is just my attempt at keeping a nice bash prompt.  You are free to use, change, comment on, learn from, explain my mistakes using, and really do as you wish with this script.\n\nDefining Terms\n==============\n\nElement - An unchanged prompt item, like date, time, user, etc.\nPrompt Part - A fully customized and ready to use prompt item - like the date, colored purple and in bold text.\nColor - The color, either foreground or background, used, like red, black, etc.\nForeground - The text of the element itself\nBackground - The highlighting or background color of the element\nAttribute - text effects like bold, underline, blink, ect.\n\n\nChanging Colors / Attributes\n============================\n\nFind the Element you wish to change the color or attribute of in the code.  For example, if we wanted to change the color of the date to bold purple on light black we would find the line:\n\n    date_color=$(_set_color \"none\" \"black\" \"light\" \"none\" \"normal\")\n\nChange the colors and attributes to say:\n\n    date_color=$(_set_color \"bold\" \"purple\" \"normal\", \"black\", \"light\")\n\nNote the order of input is:\n    _set_color: the function call to the ascii_code generator\n    \"bold\": the attribute we want to apply to the text\n    \"purple\": the text / foreground color\n    \"normal\": since we dont want the text to be light purple\n    \"black\": the highlight or background color\n    \"light\": because we want the black to be light\n\nColoring any and all elements works with this same pattern.\n\n\nChanging Prompt Part Order / Separators / etc.\n==============================================\n\nFind the function _prompt_command and look for the PS1= line:\n\n    PS1=$date_part' at '$time_part' '$username_part'@'$hostname_part' in '$cwd_part' '$NEW_LINE' ['$git_part'] '$virtualenv_part' '$separator_part' '$input_part\n\nThis is just a giant string, rearrange the parts as you wish, add parts, remove parts, add syntax, ect.\n\n\nOut of the Box Prompt and Format\n================================\n\nBy default the prompt is:\n\n\\n\\\u003cDate\\\u003e at \\\u003cTime\\\u003e \\\u003cUser\\\u003e@\\\u003cHost\\\u003e in \\\u003cpath\\\u003e \\n\n[\\\u003cgit status\\\u003e] (\\\u003cvirtual environment\\\u003e) $\n\nThe  virtual environment only show up if it exists, git shows None if not there.\n\n\nEnjoy.\nChad R Befus.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbefus%2Fnice_prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbefus%2Fnice_prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbefus%2Fnice_prompt/lists"}