{"id":13479816,"url":"https://github.com/Scriptim/bash-prompt-generator","last_synced_at":"2025-03-27T10:30:46.744Z","repository":{"id":37768900,"uuid":"100183527","full_name":"Scriptim/bash-prompt-generator","owner":"Scriptim","description":"Customize your Bash Prompt by setting the PS1 variable.","archived":false,"fork":false,"pushed_at":"2024-09-29T21:53:04.000Z","size":5238,"stargazers_count":636,"open_issues_count":3,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T15:02:55.126Z","etag":null,"topics":["bash","bash-prompt","bashrc","command-line","gh-pages","gnu-linux","linux","prompt","ps1","ps1-variable","shell","shell-prompt","terminal","tool","typescript","vue","web-tool","webapp","website"],"latest_commit_sha":null,"homepage":"https://bash-prompt-generator.org/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scriptim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-13T14:48:19.000Z","updated_at":"2025-03-21T07:14:40.000Z","dependencies_parsed_at":"2024-12-28T15:02:18.149Z","dependency_job_id":null,"html_url":"https://github.com/Scriptim/bash-prompt-generator","commit_stats":{"total_commits":218,"total_committers":4,"mean_commits":54.5,"dds":0.03669724770642202,"last_synced_commit":"905c0526a1c4103b9dc002679e24f95c76e8ebe5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scriptim%2Fbash-prompt-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scriptim%2Fbash-prompt-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scriptim%2Fbash-prompt-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scriptim%2Fbash-prompt-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scriptim","download_url":"https://codeload.github.com/Scriptim/bash-prompt-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245826712,"owners_count":20678844,"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","bash-prompt","bashrc","command-line","gh-pages","gnu-linux","linux","prompt","ps1","ps1-variable","shell","shell-prompt","terminal","tool","typescript","vue","web-tool","webapp","website"],"created_at":"2024-07-31T16:02:23.422Z","updated_at":"2025-03-27T10:30:46.440Z","avatar_url":"https://github.com/Scriptim.png","language":"TypeScript","readme":"# Bash Prompt Generator\n\n**Create a custom PS1 variable for your Bash.**\n\n[![github-stars](https://img.shields.io/github/stars/Scriptim/bash-prompt-generator?style=social)](https://github.com/Scriptim/bash-prompt-generator/stargazers \"Stargazers\")\n\u0026emsp;\n[![github-forks](https://img.shields.io/github/forks/Scriptim/bash-prompt-generator?style=social)](https://github.com/Scriptim/bash-prompt-generator/fork \"Forks\")\n\n\n\u003c!-- badge generated using https://forthebadge.com/generator/ --\u003e\n[![generate-your-prompt](./docs/generate-your-prompt.svg)](https://bash-prompt-generator.org \"Check it out\")\n\n## What is a Bash  Prompt?\n\nThe prompt is a short piece of text that is displayed in the Bash shell prompting you to enter a command.\n\n![Bash Prompt Example](./docs/bash_prompt_example.png)\n\nIt usually contains some useful information about the current user, the working directory, etc.\n\n## Where is the Prompt Configured?\n\nThe `PS1` environment variable determines what information the prompt contains and how it is displayed.\n\n![Echo $PS1](./docs/bash_echo_ps1.png)\n\nThe default value may vary between different distributions and versions.\n\nSetting the `PS1` variable yourself (e.\u0026nbsp;g. by appending the line `PS1='[\\u@\\h \\w]\\$ '` to your `~/.bashrc` file) allows you to customize your prompt.\n\n## How is the Prompt Configured?\n\nThe syntax of the `PS1` variable allows versatile customization options.\nIn addition to the information displayed, colors as well as other display attributes can be adjusted.\n\nHowever, this syntax is difficult to read by humans and manual customization is therefore extremely tedious.\n\nFor this reason, this project provides a way to create a prompt via a GUI without having to modify the PS1 variable itself.\n\n### See also\n\n- [GNU Bash Manual: Controlling the Prompt](https://www.gnu.org/software/bash/manual/html_node/Controlling-the-Prompt.html)\n- [ArchWiki: Bash/Prompt customization](https://wiki.archlinux.org/index.php/Bash/Prompt_customization)\n\n## How to Use\n\n### Getting Started\n\nWhen you visit the [website](https://bash-prompt-generator.org) for the first time, you have the option to either create a new prompt from scratch or import your current prompt for adjustment.\n\n![Website First View](./docs/bash_prompt_generator_initial.png)\n\nA prompt consists of multiple so-called *elements*.\nYou can click on one of the elements on the left (*Prompt Elements*) to add it to your prompt.\nIf you choose to import your existing prompt, paste the output of `echo $PS1` (e.\u0026nbsp;g. `[\\u@\\h \\w]\\$ `) into the text field and the according elements will be automatically added to your prompt.\n\n### Your Prompt\n\nThe *Your Prompt* sections lists all elements that are currently part of your prompt.\n\n![Your Prompt](./docs/bash_prompt_generator_your_prompt.png)\n\nYou can always add more elements from the *Prompt Elements* section on the left, reorder the elements in your prompt using drag and drop or remove them.\n\nThe trash icon will remove all elements from your prompt, letting you start from scratch.\n\nThe command for setting the `PS1` variable is displayed in the *Output* section, along with an example preview of how your prompt might look like.\n\n![Output](./docs/bash_prompt_generator_output.png)\n\nThe clipboard icon will copy the full command to your clipboard.\n\nIf you run the generated command in your terminal, you will immediately see the changes to your prompt.\nThese changes will be lost when you close your terminal, however.\nIn order to make the changes permanent, you have to add the command to your `~/.bashrc` file.\n\nNote that the preview will most likely differ from the actual prompt in your terminal because the environment (such as the current user, hostname, etc.) is different.\n\nYou can click on the lightbulb icon to toggle between a dark and a light background for the preview.\n\n### Properties\n\nAll elements can be selected by clicking on them.\n\n![Selected](./docs/bash_prompt_generator_selected.png)\n\nDepending on the type of the selected element, different properties can be adjusted.\n\n![Properties](./docs/bash_prompt_generator_properties.png)\n\nMost elements support colors and various display attributes.\n\nLook at the example preview to see how these properties affect the prompt.\n\nForeground and background colors can be choosen via a color picker.\n\n![Color Picker](./docs/bash_prompt_generator_colors.png)\n\nThe color picker provides a *no color* option for resetting to the default color, 16 4-bit colors (top row) and 256 8-bit colors (bottom rows).\n\nNote that some terminals may not support all colors.\nThe same applies to display attributes.\n\nAdditionally, you can duplicate the selected element with the copy icon under *Actions*.\n\n#### Special Elements\n\nSome element types have special properties:\n\n* *Date (formatted)* requires a string specifying the date format which will be passed to [`strftime(3)`](https://linux.die.net/man/3/strftime \"man 3 strftime\").\n* *Command* requires a string specifying the command to be executed.\nThe prompt will contain the standard output of the command.\n  * The *Git Branch* and *IP Address* elements are functionally equivalent to a *Command* element with the command already filled in.\n* *Text* requires an arbitrary string that will be included as is in the prompt.\n* *Environment Variable* requires the name of an environment variable and configuring the [parameter expansion](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html \"GNU Bash Manual: Shell Parameter Expansion\").\n\n## License\n\nCopyright (C) 2017 - 2024 Scriptim\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.\n\nYou should have received a [copy of the GNU General Public License](./LICENSE) along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","funding_links":[],"categories":["TypeScript","bash","website"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FScriptim%2Fbash-prompt-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FScriptim%2Fbash-prompt-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FScriptim%2Fbash-prompt-generator/lists"}