Diff
1diff --git a/README.md b/README.md
2index 907248beb04e3d5864ea94d9b94ffda12b9060fc..5712c170193bda1145ac9d1b83e8dfd33e048ffa 100644
3--- a/README.md
4+++ b/README.md
5@@ -68,7 +68,7 @@ plugins=(
6 git
7 bundler
8 dotenv
9- osx
10+ macos
11 rake
12 rbenv
13 ruby
14diff --git a/plugins/osx/README.md b/plugins/macos/README.md
15rename from plugins/osx/README.md
16rename to plugins/macos/README.md
17index 50458f60e92f465ff11f9fc3dfcdeb2b934369ff..1bc4244a4d5e48028547a34330863a58ac02f241 100644
18--- a/plugins/osx/README.md
19+++ b/plugins/macos/README.md
20@@ -1,11 +1,11 @@
21-# OSX plugin
22+# MacOS plugin
23
24 This plugin provides a few utilities to make it more enjoyable on macOS (previously named OSX).
25
26-To start using it, add the `osx` plugin to your plugins array in `~/.zshrc`:
27+To start using it, add the `macos` plugin to your plugins array in `~/.zshrc`:
28
29 ```zsh
30-plugins=(... osx)
31+plugins=(... macos)
32 ```
33
34 Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
35@@ -31,7 +31,7 @@ Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
36 | `itunes` | _DEPRECATED_. Use `music` from macOS Catalina on |
37 | `music` | Control Apple Music. Use `music -h` for usage details |
38 | `spotify` | Control Spotify and search by artist, album, track… |
39-| `rmdsstore` | Remove .DS\_Store files recursively in a directory |
40+| `rmdsstore` | Remove .DS_Store files recursively in a directory |
41 | `btrestart` | Restart the Bluetooth daemon |
42 | `freespace` | Erases purgeable disk space with 0s on the selected disk |
43
44diff --git a/plugins/osx/_security b/plugins/macos/_security
45rename from plugins/osx/_security
46rename to plugins/macos/_security
47diff --git a/plugins/osx/osx.plugin.zsh b/plugins/macos/macos.plugin.zsh
48rename from plugins/osx/osx.plugin.zsh
49rename to plugins/macos/macos.plugin.zsh
50index 16f16ddb699c4d93878bc9832364ca3737fbe21b..4bcbbaead2ac9727b887595f7a4c18cc2076ac9f 100644
51--- a/plugins/osx/osx.plugin.zsh
52+++ b/plugins/macos/macos.plugin.zsh
53@@ -1,3 +1,9 @@
54+# Check if 'osx' is still in the plugins list and prompt to change to 'macos'
55+if [[ -n "${plugins[(r)osx]}" ]]; then
56+ print ${(%):-"%F{yellow}The \`osx\` plugin is deprecated and has been renamed to \`macos\`."}
57+ print ${(%):-"Please update your .zshrc to use the \`%Bmacos%b\` plugin instead.%f"}
58+fi
59+
60 # Open the current directory in a Finder window
61 alias ofd='open_command $PWD'
62
63@@ -11,7 +17,7 @@ function btrestart() {
64 sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
65 }
66
67-function _omz_osx_get_frontmost_app() {
68+function _omz_macos_get_frontmost_app() {
69 osascript 2>/dev/null <<EOF
70 tell application "System Events"
71 name of first item of (every process whose frontmost is true)
72@@ -24,7 +30,7 @@ function tab() {
73 local command="cd \\\"$PWD\\\"; clear"
74 (( $# > 0 )) && command="${command}; $*"
75
76- local the_app=$(_omz_osx_get_frontmost_app)
77+ local the_app=$(_omz_macos_get_frontmost_app)
78
79 if [[ "$the_app" == 'Terminal' ]]; then
80 # Discarding stdout to quash "tab N of window id XXX" output
81@@ -77,7 +83,7 @@ function vsplit_tab() {
82 local command="cd \\\"$PWD\\\"; clear"
83 (( $# > 0 )) && command="${command}; $*"
84
85- local the_app=$(_omz_osx_get_frontmost_app)
86+ local the_app=$(_omz_macos_get_frontmost_app)
87
88 if [[ "$the_app" == 'iTerm' ]]; then
89 osascript <<EOF
90@@ -125,7 +131,7 @@ function split_tab() {
91 local command="cd \\\"$PWD\\\"; clear"
92 (( $# > 0 )) && command="${command}; $*"
93
94- local the_app=$(_omz_osx_get_frontmost_app)
95+ local the_app=$(_omz_macos_get_frontmost_app)
96
97 if [[ "$the_app" == 'iTerm' ]]; then
98 osascript 2>/dev/null <<EOF
99diff --git a/plugins/osx/music b/plugins/macos/music
100rename from plugins/osx/music
101rename to plugins/macos/music
102diff --git a/plugins/macos/osx.plugin.zsh b/plugins/macos/osx.plugin.zsh
103new file mode 120000
104index 0000000000000000000000000000000000000000..73d718d43057e8f8b7418ca167ac8b878e8d466c
105--- /dev/null
106+++ b/plugins/macos/osx.plugin.zsh
107@@ -0,0 +1 @@
108+macos.plugin.zsh
109diff --git a/plugins/osx/spotify b/plugins/macos/spotify
110rename from plugins/osx/spotify
111rename to plugins/macos/spotify
112diff --git a/plugins/osx b/plugins/osx
113new file mode 120000
114index 0000000000000000000000000000000000000000..a8d0f9c4854deee5143f9ed1aaff34d834b834f8
115--- /dev/null
116+++ b/plugins/osx
117@@ -0,0 +1 @@
118+macos