From 723b3812e170975901fd371d549bc4ae78a88298 Mon Sep 17 00:00:00 2001 From: Kyle Rich Date: Thu, 27 Apr 2017 11:25:42 -0600 Subject: [PATCH] Convert long-pwd to pwd-length --- modules/prompt/functions/promptpwd | 4 +++- runcoms/zpreztorc | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/prompt/functions/promptpwd b/modules/prompt/functions/promptpwd index af30e7c..d7659f9 100644 --- a/modules/prompt/functions/promptpwd +++ b/modules/prompt/functions/promptpwd @@ -9,7 +9,9 @@ local ret_directory if [[ "$current_pwd" == (#m)[/~] ]]; then ret_directory="$MATCH" unset MATCH -elif zstyle -t ':prezto:module:prompt' long-pwd; then +elif zstyle -m ':prezto:module:prompt' pwd-length 'full'; then + ret_directory=${PWD} +elif zstyle -m ':prezto:module:prompt' pwd-length 'long'; then ret_directory=${current_pwd} else ret_directory="${${${${(@j:/:M)${(@s:/:)current_pwd}##.#?}:h}%/}//\%/%%}/${${current_pwd:t}//\%/%%}" diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 3741a1c..e88ae3c 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -97,8 +97,8 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # Auto set to 'off' on dumb terminals. zstyle ':prezto:module:prompt' theme 'sorin' -# Display pwd in long format for themes that use promptpwd function -# zstyle ':prezto:module:prompt' long-pwd 'yes' +# Set how themes that use promptpwd function display the pwd, can be 'short', 'long', or 'full' +# zstyle ':prezto:module:prompt' pwd-length 'short' # # Ruby