summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-12-08 14:12:15 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-12-08 14:12:15 +0300
commitabc5df446d28b64a7c792b867da6d0357a675e39 (patch)
tree94749bd65f1371c28bbf8364011cc09e0afadcfc /internal/p10k.zsh
parent3380f7503e7dc252163d5b30475335ed67f58a98 (diff)
attempt to fix asdf when some files have windows line endings (#1653)
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 90191b95..dfd1c1ba 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5348,7 +5348,7 @@ function _p9k_asdf_init_meta() {
files+=$parse
[[ -x $parse ]] && has_parse=1
local name
- for name in $($list_names 2>/dev/null); do
+ for name in ${$($list_names 2>/dev/null)%$'\r'}; do
[[ $name == (*/*|.tool-versions) ]] && continue
_p9k_asdf_file_info[$name]+="${plugin:t} $has_parse "
done
@@ -5402,8 +5402,8 @@ function _p9k_asdf_parse_version_file() {
local v=($(${ASDF_DATA_DIR:-~/.asdf}/plugins/$plugin/bin/parse-legacy-file $file 2>/dev/null))
else
{ local v=($(<$file)) } 2>/dev/null
- v=(${v%$'\r'})
fi
+ v=(${v%$'\r'})
v=${v[(r)$_p9k_asdf_plugins[$plugin]]:-$v[1]}
_p9k_asdf_file2versions[$plugin:$file]=$stat[1]:"$v"
_p9k__state_dump_scheduled=1