Make path separator configurable for dir prompt
Now the path separator can be configured by setting `POWERLEVEL9K_DIR_PATH_SEPARATOR`
This commit is contained in:
parent
7a776dc68c
commit
a1b4d44755
|
@ -456,6 +456,7 @@ prompt_custom() {
|
|||
}
|
||||
|
||||
# Dir: current working directory
|
||||
set_default POWERLEVEL9K_DIR_PATH_SEPARATOR "/"
|
||||
prompt_dir() {
|
||||
local current_path='%~'
|
||||
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" ]]; then
|
||||
|
@ -503,6 +504,10 @@ prompt_dir() {
|
|||
esac
|
||||
fi
|
||||
|
||||
if [[ "${POWERLEVEL9K_DIR_PATH_SEPARATOR}" != "/" ]]; then
|
||||
current_path=$(echo "${current_path}" | sed "s/\//${POWERLEVEL9K_DIR_PATH_SEPARATOR}/g")
|
||||
fi
|
||||
|
||||
typeset -AH dir_states
|
||||
dir_states=(
|
||||
"DEFAULT" "FOLDER_ICON"
|
||||
|
|
Loading…
Reference in New Issue