{"id":20031234,"url":"https://github.com/filippobovo/bash_powerline","last_synced_at":"2025-05-05T04:31:28.834Z","repository":{"id":98825566,"uuid":"129611207","full_name":"FilippoBovo/bash_powerline","owner":"FilippoBovo","description":"Bash Powerline Command Prompt","archived":false,"fork":false,"pushed_at":"2018-04-24T09:02:51.000Z","size":3889,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T16:55:13.890Z","etag":null,"topics":["bash","powerline"],"latest_commit_sha":null,"homepage":null,"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/FilippoBovo.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":"2018-04-15T13:09:56.000Z","updated_at":"2018-04-27T23:42:53.000Z","dependencies_parsed_at":"2023-04-13T15:22:19.634Z","dependency_job_id":null,"html_url":"https://github.com/FilippoBovo/bash_powerline","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/FilippoBovo%2Fbash_powerline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilippoBovo%2Fbash_powerline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilippoBovo%2Fbash_powerline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FilippoBovo%2Fbash_powerline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FilippoBovo","download_url":"https://codeload.github.com/FilippoBovo/bash_powerline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252439660,"owners_count":21748051,"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","powerline"],"created_at":"2024-11-13T09:31:46.131Z","updated_at":"2025-05-05T04:31:28.825Z","avatar_url":"https://github.com/FilippoBovo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Bash Powerline\n\nThis is a short guide to create a Bash Powerline based on existing online resources.\n\n![demo](demo.gif)\n\nThis Bash Powerline:\n\n- displays the Git status in the command prompt, including information on the active branch and the presence of un-staged files, un-committed files and un-pushed commits;\n- displays the active Python Virtual Environment;\n- automatically activate a Python Virtual Environment when cd'ing into a path that contains a folder with the same name of the virtual environment.\n\n## Install\n\nDownload the following files into your home folder:\n\n- The [official Git Command Prompt script](https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh).\n\n  ```shell\n  curl -o $HOME/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh\n  ```\n\n- The script to auto-activate a virtual environment — [credits to Harry Marr](https://hmarr.com/2010/jan/19/making-virtualenv-play-nice-with-git/).\n\n  ```shell\n  curl -o $HOME/.auto-virtualenv.sh https://raw.githubusercontent.com/FilippoBovo/bash_powerline/master/auto-virtualenv.sh\n  ```\n\n- The Virtual Environment Command Prompt script — [adapted from ivanalejandro0 and Daniel Harding's script](https://stackoverflow.com/a/20026992).\n\n  ```shell\n  curl -o $HOME/.virtualenv-prompt.sh https://raw.githubusercontent.com/FilippoBovo/bash_powerline/master/virtualenv-prompt.sh\n  ```\nAdd the following lines to your `~/.bashrc` file if you are using Linux or to your `~/.bash_profile` if you are using Mac OS.\n\n```shell\n# COMMAND PROMPT: BASH POWERLINE\nsource $HOME/.git-prompt.sh\nexport GIT_PS1_SHOWDIRTYSTATE=\"True\"\nexport GIT_PS1_SHOWUNTRACKEDFILES=\"True\"\nexport GIT_PS1_SHOWUPSTREAM=\"auto\"\n\nsource $HOME/.auto-virtualenv.sh\nsource $HOME/.virtualenv-prompt.sh\nexport VIRTUAL_ENV_DISABLE_PROMPT=1\n\nexport COL_BASE=$(tput setab 4)$(tput setaf 0)  # Base Colour\nexport COL_VENV=$(tput setab 3)$(tput setaf 0)  # Virtual Environment Colour\nexport COL_GIT=$(tput setab 2)$(tput setaf 0)  # Git Colour\nexport COL_RESET=$(tput sgr0)  # Colour Reset\n\nexport PS1='\\[$COL_BASE\\] \\u@\\h: \\W $(virtualenv_info \"\\[$COL_VENV\\] %s \")$(__git_ps1 \"\\[$COL_GIT\\] %s \")❯❯❯\\[$COL_RESET\\] '\n```\n\nFinally, restart the terminal.\n\n### Colours\n\nThe colour configuration used in the above script leads to the colours in the Gif above if coupled with the [Solarized Dark](https://github.com/mbadolato/iTerm2-Color-Schemes#builtin-solarized-dark) colour theme for [iTerm2](https://www.iterm2.com/).\n\nIf you are using another theme, you can look for a colour configuraton that matches your theme by changing the number after `tput setab` in the script above according to [this guide](https://linux.101hacks.com/ps1-examples/prompt-color-using-tput/).\n\n## Uninstall\n\nTo uninstall this Bash Powerline, simply remove the script snippet added to the `~/.bashrc` or `~/.bash_profile` files during the installation, and remove the downloaded files.\n\n```shell\nrm $HOME/.git-prompt.sh $HOME/.auto-virtualenv.sh $HOME/.virtualenv-prompt.sh\n```\n\nFinally, restart the terminal.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilippobovo%2Fbash_powerline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilippobovo%2Fbash_powerline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilippobovo%2Fbash_powerline/lists"}