summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <hello@mcornella.com>2023-04-03 23:36:44 +0200
committerMarc Cornellà <hello@mcornella.com>2023-04-03 23:36:44 +0200
commit9233ef75f28423d147a2f9f64a45a77b1886ee5d (patch)
tree13e874d2af16424a18a6a60626388815473eac00
parentc7bb88f9ad3eb742aecca2e36b615819cead10f4 (diff)
downloadzsh-9233ef75f28423d147a2f9f64a45a77b1886ee5d.tar.gz
zsh-9233ef75f28423d147a2f9f64a45a77b1886ee5d.tar.bz2
zsh-9233ef75f28423d147a2f9f64a45a77b1886ee5d.zip
fix(init): don't use digits in parameter modifiers for compatibility (#11598)
Digit modifiers were introduced in zsh 5.7.1 [1]. This commit uses readily available alternatives for backwards compatibility. [1] https://github.com/zsh-users/zsh/commit/b8dc5a7f6d Fixes #11598
-rw-r--r--oh-my-zsh.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 20d2e354c..e047d4834 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -151,8 +151,8 @@ _omz_source() {
# Construct zstyle context based on path
case "$filepath" in
- lib/*) context="lib:${filepath:t:r}" ;; # :t = lib_name.zsh, :r = lib_name
- plugins/*) context="plugins:${filepath:h2:t}" ;; # :h2 = plugins/plugin_name, :t = plugin_name
+ lib/*) context="lib:${filepath:t:r}" ;; # :t = lib_name.zsh, :r = lib_name
+ plugins/*) context="plugins:${filepath:h:t}" ;; # :h = plugins/plugin_name, :t = plugin_name
esac
local disable_aliases=0
@@ -184,7 +184,7 @@ _omz_source() {
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for config_file ("$ZSH"/lib/*.zsh); do
- _omz_source "${config_file:t2}"
+ _omz_source "lib/${config_file:t}"
done
unset custom_config_file