mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 08:20:10 +00:00
Add ability to omit the first character in dir path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user