Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 1.74 KB

README.md

File metadata and controls

69 lines (43 loc) · 1.74 KB

git-branch-win-title

A small shell function that adds the current git branch (if present) to the terminal emulator window title.

Requirements

Quick Start

Configuration may vary depending on the user's OS, terminal emulator, and shell interpreter. But in most cases, the following command should be enough:

$ source branch-win-title.sh

You may also want to add this line to your shell configuration file e.g. .profile, .bashrc, .zshrc, etc.

Shell interpreter support

Terminal Emulator support

Tested on the following terminal emulators:

Additional configuration

Powerline

The branch-win-title.sh script must be loaded first before configuring powerline otherwise it will override the powerline-generated shell prompt.

Guake

Enable the following settings under Main Window:

  • Show tab bar
  • Use VTE titles for tab names

iTerm2

Enable the following settings under Preferences > Profiles:

  • Terminal may set tab/window title

Tmux

Add the following entries to .tmux.conf:

set-option -g set-titles on
set-option -g set-titles-string "#T"
set-option -g automatic-rename on

Demo