From 7edc0233fe7eba04361221f6baf9750f9c18dd04 Mon Sep 17 00:00:00 2001 From: oGre Date: Tue, 6 Oct 2015 17:36:52 +0200 Subject: [PATCH] Updated documentation --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 09a24f9..278de6f 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,10 @@ function prompt_callback { } ``` +- There are two helper functions that can be used within `prompt_callback`: + - `gp_set_window_title ` - sets the window title to the given string (should work for XTerm type terminals like in OS X or Ubuntu) + - `gp_truncate_pwd` - a function that returns the current PWD truncated to fit the current terminal width + - If you want to show the git prompt only if you are in a git repository you can set ``GIT_PROMPT_ONLY_IN_REPO=1`` before sourcing the gitprompt script