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