diff options
author | Marc Cornellà <hello@mcornella.com> | 2022-02-22 11:23:14 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2022-02-22 11:25:31 +0100 |
commit | 6f1036293cdc1af12dbe6390a061c147de1196ff (patch) | |
tree | ecb0e9b3db00d0c8ed92adac7dc1a985a4c548e2 | |
parent | 11a23144ad189b6befee2332383188dbffecee6c (diff) | |
download | zsh-6f1036293cdc1af12dbe6390a061c147de1196ff.tar.gz zsh-6f1036293cdc1af12dbe6390a061c147de1196ff.tar.bz2 zsh-6f1036293cdc1af12dbe6390a061c147de1196ff.zip |
refactor(copydir)!: deprecate plugin in favor of `copypath`
BREAKING CHANGE: the `copydir` plugin is deprecated. Instead of
using `copydir`, use `copypath` which also supports copying
the path of other files or directories specified.
-rw-r--r-- | plugins/copydir/README.md | 9 | ||||
-rw-r--r-- | plugins/copydir/copydir.plugin.zsh | 8 |
2 files changed, 6 insertions, 11 deletions
diff --git a/plugins/copydir/README.md b/plugins/copydir/README.md index 594bf1065..cf24b789f 100644 --- a/plugins/copydir/README.md +++ b/plugins/copydir/README.md @@ -1,10 +1,3 @@ # copydir plugin -Copies the path of your current folder to the system clipboard. - -To use, add `copydir` to your plugins array: -``` -plugins=(... copydir) -``` - -Then use the command `copydir` to copy the $PWD. +This plugin is deprecated. Use the [`copypath` plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copypath) instead. diff --git a/plugins/copydir/copydir.plugin.zsh b/plugins/copydir/copydir.plugin.zsh index c45106240..a2b489ec0 100644 --- a/plugins/copydir/copydir.plugin.zsh +++ b/plugins/copydir/copydir.plugin.zsh @@ -1,5 +1,7 @@ -# Copies the pathname of the current directory to the system or X Windows clipboard +echo ${(%):-'%F{yellow}The `%Bcopydir%b` plugin is deprecated. Use the `%Bcopypath%b` plugin instead.%f'} +source "$ZSH/plugins/copypath/copypath.plugin.zsh" + +# TODO: 2022-02-22: Remove deprecated copydir function. function copydir { - emulate -L zsh - print -n $PWD | clipcopy + copypath } |