1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 13:30:07 +00:00

when searching for files in ancestor directories, do match in $HOME (#1376)

This commit is contained in:
Roman Perepelitsa 2021-05-22 11:57:13 +02:00
parent 4d2346da0a
commit 1ad8e5759e

View file

@ -204,15 +204,15 @@ function _p9k_fetch_cwd() {
_p9k__cwd_a=${${_p9k__cwd:A}:-.} _p9k__cwd_a=${${_p9k__cwd:A}:-.}
case $_p9k__cwd in case $_p9k__cwd in
~|/|.) /|.)
_p9k__parent_dirs=() _p9k__parent_dirs=()
_p9k__parent_mtimes=() _p9k__parent_mtimes=()
_p9k__parent_mtimes_i=() _p9k__parent_mtimes_i=()
_p9k__parent_mtimes_s= _p9k__parent_mtimes_s=
return return
;; ;;
~/*) ~|~/*)
local parent=~/ local parent=${${${:-~/..}:a}%/}/
local parts=(${(s./.)_p9k__cwd#$parent}) local parts=(${(s./.)_p9k__cwd#$parent})
;; ;;
*) *)
@ -255,7 +255,7 @@ function _p9k_glob() {
# #
# Returns index within _p9k__parent_dirs or 0 if there is no match. # Returns index within _p9k__parent_dirs or 0 if there is no match.
# #
# Pattern cannot have slashes. Never matches in / or ~. Search stops before reaching / or ~. # Search stops before reaching ~/../ or / and never matches in those directories.
# #
# Example: _p9k_upglob '*.csproj' # Example: _p9k_upglob '*.csproj'
function _p9k_upglob() { function _p9k_upglob() {
@ -8046,7 +8046,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1 [[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit _p9k_deinit
fi fi
_p9k__param_pat=$'v121\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1' _p9k__param_pat=$'v122\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
_p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1' _p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1'