Add ability to omit the first character in dir path
This commit is contained in:
parent
a58e8bdc8c
commit
b379f03f14
2 changed files with 9 additions and 2 deletions
|
@ -616,6 +616,10 @@ prompt_dir() {
|
|||
esac
|
||||
fi
|
||||
|
||||
if [[ "${POWERLEVEL9K_DIR_OMIT_FIRST_CHARACTER}" == "true" ]]; then
|
||||
current_path="${current_path[2,-1]}"
|
||||
fi
|
||||
|
||||
if [[ "${POWERLEVEL9K_DIR_PATH_SEPARATOR}" != "/" ]]; then
|
||||
current_path=$(print -P "${current_path}" | sed "s/\//${POWERLEVEL9K_DIR_PATH_SEPARATOR}/g")
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue