summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/zsh_reload/README.md22
-rw-r--r--plugins/zsh_reload/zsh_reload.plugin.zsh25
2 files changed, 6 insertions, 41 deletions
diff --git a/plugins/zsh_reload/README.md b/plugins/zsh_reload/README.md
index d31a827fe..0b2e2a775 100644
--- a/plugins/zsh_reload/README.md
+++ b/plugins/zsh_reload/README.md
@@ -1,23 +1,3 @@
# zsh_reload plugin
-The zsh_reload plugin defines a function to reload the zsh session with
-just a few keystrokes.
-
-To use it, add `zsh_reload` to the plugins array in your zshrc file:
-
-```zsh
-plugins=(... zsh_reload)
-```
-
-## Usage
-
-To reload the zsh session, just run `src`:
-
-```zsh
-$ vim ~/.zshrc # enabled a plugin
-$ src
-re-compiling /home/user/.zshrc.zwc: succeeded
-re-compiling /home/user/.oh-my-zsh/cache/zcomp-host.zwc: succeeded
-
-# you now have a fresh zsh session. happy hacking!
-```
+**This plugin is deprecated.** Use `omz reload` or `exec zsh` instead.
diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh
index 0d29a7ce3..6a058ec5e 100644
--- a/plugins/zsh_reload/zsh_reload.plugin.zsh
+++ b/plugins/zsh_reload/zsh_reload.plugin.zsh
@@ -1,22 +1,7 @@
-src() {
- local cache="$ZSH_CACHE_DIR"
- autoload -U compinit zrecompile
- compinit -i -d "$cache/zcomp-$HOST"
-
- for f in ${ZDOTDIR:-~}/.zshrc "$cache/zcomp-$HOST"; do
- zrecompile -p $f && command rm -f $f.zwc.old
- done
+print ${(%):-"%F{yellow}The \`zsh_reload\` plugin is deprecated and will be removed."}
+print ${(%):-"Use \`%Bomz reload%b\` or \`%Bexec zsh%b\` instead.%f"}
- # Use $SHELL if it's available and a zsh shell
- local shell="$ZSH_ARGZERO"
- if [[ "${${SHELL:t}#-}" = zsh ]]; then
- shell="$SHELL"
- fi
-
- # Remove leading dash if login shell and run accordingly
- if [[ "${shell:0:1}" = "-" ]]; then
- exec -l "${shell#-}"
- else
- exec "$shell"
- fi
+src() {
+ print ${(%):-"%F{yellow}$0 is deprecated. Use \`%Bomz reload%b\` or \`%Bexec zsh%b\` instead.%f\n"}
+ omz reload
}