Add ability to omit the first character in dir path

This commit is contained in:
Dominik Ritter 2017-01-30 21:10:09 +01:00
commit b379f03f14
2 changed files with 9 additions and 2 deletions

View file

@ -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