mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 20:30:07 +00:00
Do path expansion at first
This commit is contained in:
parent
b379f03f14
commit
268c3247c9
1 changed files with 2 additions and 2 deletions
|
@ -570,7 +570,7 @@ prompt_custom() {
|
||||||
# Dir: current working directory
|
# Dir: current working directory
|
||||||
set_default POWERLEVEL9K_DIR_PATH_SEPARATOR "/"
|
set_default POWERLEVEL9K_DIR_PATH_SEPARATOR "/"
|
||||||
prompt_dir() {
|
prompt_dir() {
|
||||||
local current_path='%~'
|
local current_path="$(print -P "%~")"
|
||||||
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" ]]; then
|
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" ]]; then
|
||||||
|
|
||||||
set_default POWERLEVEL9K_SHORTEN_DELIMITER $'\U2026'
|
set_default POWERLEVEL9K_SHORTEN_DELIMITER $'\U2026'
|
||||||
|
@ -621,7 +621,7 @@ prompt_dir() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${POWERLEVEL9K_DIR_PATH_SEPARATOR}" != "/" ]]; then
|
if [[ "${POWERLEVEL9K_DIR_PATH_SEPARATOR}" != "/" ]]; then
|
||||||
current_path=$(print -P "${current_path}" | sed "s/\//${POWERLEVEL9K_DIR_PATH_SEPARATOR}/g")
|
current_path="$( echo "${current_path}" | sed "s/\//${POWERLEVEL9K_DIR_PATH_SEPARATOR}/g")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
typeset -AH dir_states
|
typeset -AH dir_states
|
||||||
|
|
Loading…
Reference in a new issue