Skip to content
A collection of bash utilities. Set and unset proxy. Completions for git, svn and ssh. PS1 customization.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a collection of bash utilities. It contains:

  • PS1 customization with Git and Svn integration.
  • Bash Completions for Git, Svn, SSH and SFTP.
  • set/unset proxy faster.
  • Updatable bash_profile project.

Get started

Clone this project in your home folder ~.

cd ~ && git clone

Open and modify your $HOME/.bash_profile on OS X and Windows or $HOME/.bashrc on Ubuntu, adding the following script.

source ~/bash_profile/.bash_profile -u


  • -p <http-proxy>: combined with -u, you can use self-update behind proxy.
  • -u: enables self-update for bash_profile. (the latest release will automatically downloaded and loaded)
  • -w: show welcome screen on new tabs.


The following procedure works for OS X. If you are using Windows or Ubuntu, you don't need it.

If you want to use the git, svn and ssh completion, just run following scripts.

# Bash Completion for GIT
curl -o ~/bash_profile/.bash_completion_git

# Bash Completion for SVN
curl -o ~/bash_profile/.bash_completion_svn

# Bash Completion for SSH and SFTP
curl -o ~/bash_profile/.bash_completion_ssh

Useful Commands

Bash Profile

  • bash_profile__path - get project path.

  • bash_profile__cd - cd to the bash_profile folder. Something like cd ~/bash_profile

  • bash_profile__version - get current version.

  • bash_profile__reload - reload the project.

  • bash_profile__reload_all - reload your own .bash_profile or .bashrc.

  • bash_profile__update - update the bash_profile project with latest changes. Is "just" a git pull 😄


Below a list of utilities that you can use on command line or your own .bash_profile.

  • console__set_title - set a console title. (only for OS X and Windows)

  • cli__is_installed - check if a program is installed on your system. cli__is_installed node will return true if node is installed on your system, false otherwise.

  • proxy__set - simply set the command line proxy. It works also for npm and apm, if you use them. usage: proxy__set http://domain:8080 or proxy__set http://domain:8080 https://domain:8080

  • proxy__unset - simply unset the command line proxy.

  • network__get_ip - get ip address (e.g.

  • network__get_gateway - get gateway address (e.g.

  • network__get_broadcast - get broadcast address (e.g.

  • java__use_jdk - if you work with different version of JDK, you can easily switch with java__use_jdk 1.8. (only for OS X)


  • git__update_date - update last commit with current date. usage: git__update_date or git__update_date -v -5H (only for OS X)

PS1 customization

PS1 is customized with multiple lines.

  1. green label - you can fetch the pwd path.
  2. yellow label (optional) - it appear inside Git or Svn folders.
  3. cyan label - you have the username @ hostname

Git integration

there are no changes on the active master branch

there are changes on the active master branch, but not committed yet

you have created a new-branch, but not pushed yet

you have created and pushed a new-branch

you have created a new-branch with some changes, but not committed and pushed yet

you have pushed the new-branch, but it has other changes to commit

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.