b60b3f184275c39800dd7284d6904fcf295b3956

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

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

Fixes #10428

Diff

 1diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh
 2index 4bcbbaead2ac9727b887595f7a4c18cc2076ac9f..6a91be336491754238b685b151049c454ad4d28c 100644
 3--- a/plugins/macos/macos.plugin.zsh
 4+++ b/plugins/macos/macos.plugin.zsh
 5@@ -1,9 +1,3 @@
 6-# Check if 'osx' is still in the plugins list and prompt to change to 'macos'
 7-if [[ -n "${plugins[(r)osx]}" ]]; then
 8-  print ${(%):-"%F{yellow}The \`osx\` plugin is deprecated and has been renamed to \`macos\`."}
 9-  print ${(%):-"Please update your .zshrc to use the \`%Bmacos%b\` plugin instead.%f"}
10-fi
11-
12 # Open the current directory in a Finder window
13 alias ofd='open_command $PWD'
14 
15diff --git a/plugins/macos/osx.plugin.zsh b/plugins/macos/osx.plugin.zsh
16deleted file mode 120000
17index 73d718d43057e8f8b7418ca167ac8b878e8d466c..0000000000000000000000000000000000000000
18--- a/plugins/macos/osx.plugin.zsh
19+++ /dev/null
20@@ -1 +0,0 @@
21-macos.plugin.zsh
22diff --git a/plugins/osx b/plugins/osx
23deleted file mode 120000
24index a8d0f9c4854deee5143f9ed1aaff34d834b834f8..0000000000000000000000000000000000000000
25--- a/plugins/osx
26+++ /dev/null
27@@ -1 +0,0 @@
28-macos
29diff --git a/plugins/osx/README.md b/plugins/osx/README.md
30new file mode 100644
31index 0000000000000000000000000000000000000000..98d8595455efb6353b8d41d984f1de376a669f38
32--- /dev/null
33+++ b/plugins/osx/README.md
34@@ -0,0 +1,3 @@
35+# osx plugin
36+
37+**Deprecated: use the [`macos`](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/macos) plugin instead.**
38diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
39new file mode 100644
40index 0000000000000000000000000000000000000000..9304e7f322b14d14250576ccf26dd22b4af1bd63
41--- /dev/null
42+++ b/plugins/osx/osx.plugin.zsh
43@@ -0,0 +1,5 @@
44+print ${(%):-'%F{yellow}The `osx` plugin is deprecated and has been renamed to `macos`.'}
45+print ${(%):-'Please update your .zshrc to use the `%Bmacos%b` plugin instead.%f'}
46+
47+(( ${fpath[(Ie)$ZSH/plugins/macos]} )) || fpath=("$ZSH/plugins/macos" $fpath)
48+source "$ZSH/plugins/macos/macos.plugin.zsh"