From b60b3f184275c39800dd7284d6904fcf295b3956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 17 Nov 2021 10:53:17 +0100 Subject: [PATCH] fix(osx): deprecate `osx` plugin without symlink (#10428) Fixes #10428 --- plugins/macos/macos.plugin.zsh | 6 ------ plugins/macos/osx.plugin.zsh | 1 - plugins/osx | 1 - plugins/osx/README.md | 3 +++ plugins/osx/osx.plugin.zsh | 5 +++++ 5 files changed, 8 insertions(+), 8 deletions(-) delete mode 120000 plugins/macos/osx.plugin.zsh delete mode 120000 plugins/osx create mode 100644 plugins/osx/README.md create mode 100644 plugins/osx/osx.plugin.zsh diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh index 4bcbbaead..6a91be336 100644 --- a/plugins/macos/macos.plugin.zsh +++ b/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' diff --git a/plugins/macos/osx.plugin.zsh b/plugins/macos/osx.plugin.zsh deleted file mode 120000 index 73d718d43..000000000 --- a/plugins/macos/osx.plugin.zsh +++ /dev/null @@ -1 +0,0 @@ -macos.plugin.zsh \ No newline at end of file diff --git a/plugins/osx b/plugins/osx deleted file mode 120000 index a8d0f9c48..000000000 --- a/plugins/osx +++ /dev/null @@ -1 +0,0 @@ -macos \ No newline at end of file diff --git a/plugins/osx/README.md b/plugins/osx/README.md new file mode 100644 index 000000000..98d859545 --- /dev/null +++ b/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.** diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh new file mode 100644 index 000000000..9304e7f32 --- /dev/null +++ b/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"