mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 08:20:10 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user