Add an option to show extended directory/path information.

Add a user selectable option 'BULLETTRAIN_DIR_EXTENDED' to show extended directory/path information. Currently this is fixed at truncating the path shown at 3 folders deep, but could be modified to support user selectable nesting/truncation.
This commit is contained in:
Jocelyn Mallon
2014-07-15 16:22:28 -07:00
parent 4c13e6b718
commit fe0b1bea20

View File

@@ -186,8 +186,11 @@ prompt_dir() {
if [[ $BULLETTRAIN_DIR_SHOW == false ]] then
return
fi
prompt_segment $BULLETTRAIN_DIR_BG $BULLETTRAIN_DIR_FG '%1~'
if [[ $BULLETTRAIN_DIR_EXTENDED != true ]] then
prompt_segment $BULLETTRAIN_DIR_BG $BULLETTRAIN_DIR_FG '%1~'
else
prompt_segment $BULLETTRAIN_DIR_BG $BULLETTRAIN_DIR_FG '%4(c:...:)%3c'
fi
}
# RVM: only shows RVM info if on a gemset that is not the default one