From edd7823388e912f5e7f3194b7a384a0b101b3d29 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 28 Feb 2017 11:54:45 -0800 Subject: [PATCH] Use shrink_path in agnoster theme if available --- themes/agnoster.zsh-theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 07546fd3..e05c2ae7 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -187,7 +187,11 @@ prompt_hg() { # Dir: current working directory prompt_dir() { - prompt_segment blue black '%~' + if type shrink_path &>/dev/null; then + prompt_segment blue black "$(shrink_path -t -l)" + else + prompt_segment blue black '%~' + fi } # Virtualenv: current working virtualenv