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:
parent
94419f54a5
commit
cf921fb90c
3 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue