Add sub folder icon when in home subdirectories

Big thanks to @dritter for guidance, @rjorgenson for great explanation.
And @bhilburn for further guidance and encouragement.
See http://i.imgur.com/2Vncypo.png for a presentation of how it looks.
This commit is contained in:
Kayant 2016-01-15 23:12:38 +00:00
commit cf921fb90c
3 changed files with 8 additions and 2 deletions

View file

@ -429,8 +429,10 @@ prompt_dir() {
fi
local current_icon=''
if [[ $(print -P "%~") == '~'* ]]; then
if [[ $(print -P "%~") == '~' ]]; then
"$1_prompt_segment" "$0_HOME" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'HOME_ICON'
elif [[ $(print -P "%~") == '~'* ]]; then
"$1_prompt_segment" "$0_HOME_SUBFOLDER" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'HOME_SUB_ICON'
else
"$1_prompt_segment" "$0_DEFAULT" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'FOLDER_ICON'
fi