浏览代码

fix(osx): deprecate `osx` plugin without symlink (#10428)

Fixes #10428
Marc Cornellà 2 年之前
父节点
当前提交
b60b3f1842
共有 5 个文件被更改,包括 8 次插入8 次删除
  1. 0 6
      plugins/macos/macos.plugin.zsh
  2. 0 1
      plugins/macos/osx.plugin.zsh
  3. 0 1
      plugins/osx
  4. 3 0
      plugins/osx/README.md
  5. 5 0
      plugins/osx/osx.plugin.zsh

+ 0 - 6
plugins/macos/macos.plugin.zsh

@@ -1,9 +1,3 @@
-# Check if 'osx' is still in the plugins list and prompt to change to 'macos'
-if [[ -n "${plugins[(r)osx]}" ]]; then
-  print ${(%):-"%F{yellow}The \`osx\` plugin is deprecated and has been renamed to \`macos\`."}
-  print ${(%):-"Please update your .zshrc to use the \`%Bmacos%b\` plugin instead.%f"}
-fi
-
 # Open the current directory in a Finder window
 alias ofd='open_command $PWD'
 

+ 0 - 1
plugins/macos/osx.plugin.zsh

@@ -1 +0,0 @@
-macos.plugin.zsh

+ 0 - 1
plugins/osx

@@ -1 +0,0 @@
-macos

+ 3 - 0
plugins/osx/README.md

@@ -0,0 +1,3 @@
+# osx plugin
+
+**Deprecated: use the [`macos`](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/macos) plugin instead.**

+ 5 - 0
plugins/osx/osx.plugin.zsh

@@ -0,0 +1,5 @@
+print ${(%):-'%F{yellow}The `osx` plugin is deprecated and has been renamed to `macos`.'}
+print ${(%):-'Please update your .zshrc to use the `%Bmacos%b` plugin instead.%f'}
+
+(( ${fpath[(Ie)$ZSH/plugins/macos]} )) || fpath=("$ZSH/plugins/macos" $fpath)
+source "$ZSH/plugins/macos/macos.plugin.zsh"