1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 05:40:07 +00:00

Added a default value for DIR_SHOW_WRITABLE.

Variable POWERLEVEL9K_DIR_SHOW_WRITABLE is now default set to false.
This commit is contained in:
Richard Tippl 2017-08-10 17:49:42 +02:00
parent b567ab22c2
commit c4a1d91118

View file

@ -689,6 +689,7 @@ prompt_command_execution_time() {
# Dir: current working directory # Dir: current working directory
set_default POWERLEVEL9K_DIR_PATH_SEPARATOR "/" set_default POWERLEVEL9K_DIR_PATH_SEPARATOR "/"
set_default POWERLEVEL9K_HOME_FOLDER_ABBREVIATION "~" set_default POWERLEVEL9K_HOME_FOLDER_ABBREVIATION "~"
set_default POWERLEVEL9K_DIR_SHOW_WRITABLE false
prompt_dir() { prompt_dir() {
local current_path="$(print -P "%~")" local current_path="$(print -P "%~")"
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_folder_marker" ]]; then if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_folder_marker" ]]; then
@ -805,7 +806,7 @@ prompt_dir() {
"NOT_WRITABLE" "LOCK_ICON" "NOT_WRITABLE" "LOCK_ICON"
) )
local current_state="DEFAULT" local current_state="DEFAULT"
if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == "true" && ! -w "$PWD" ]]; then if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
current_state="NOT_WRITABLE" current_state="NOT_WRITABLE"
elif [[ $(print -P "%~") == '~' ]]; then elif [[ $(print -P "%~") == '~' ]]; then
current_state="HOME" current_state="HOME"