From 0866f4daf4f55a52c1979002627f1bf61aa1e1c6 Mon Sep 17 00:00:00 2001 From: Ilya Maximov Date: Sun, 8 May 2022 17:24:00 +0200 Subject: [PATCH 1/4] fix(toolbox): fix the plugin's filename --- plugins/toolbox/{kubectx.plugin.zsh => toolbox.plugin.zsh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plugins/toolbox/{kubectx.plugin.zsh => toolbox.plugin.zsh} (100%) diff --git a/plugins/toolbox/kubectx.plugin.zsh b/plugins/toolbox/toolbox.plugin.zsh similarity index 100% rename from plugins/toolbox/kubectx.plugin.zsh rename to plugins/toolbox/toolbox.plugin.zsh From ed03e7127f392bb3ee51ed971e9f2c76984bb761 Mon Sep 17 00:00:00 2001 From: Ilya Maximov Date: Sun, 8 May 2022 17:29:02 +0200 Subject: [PATCH 2/4] feat(toolbox): alias for `toolbox enter` --- plugins/toolbox/README.md | 6 ++++++ plugins/toolbox/toolbox.plugin.zsh | 2 ++ 2 files changed, 8 insertions(+) diff --git a/plugins/toolbox/README.md b/plugins/toolbox/README.md index aac2bb3b0..abaca31f4 100644 --- a/plugins/toolbox/README.md +++ b/plugins/toolbox/README.md @@ -17,3 +17,9 @@ You can use it by adding `$(toolbox_prompt_info)` to your `PROMPT` or `RPROMPT` ```zsh RPROMPT='$(toolbox_prompt_info)' ``` + +## Aliases + +| Alias | Command | Description | +|-------|----------------------|----------------------------------------| +| tb | `toolbox enter` | Enters the toolbox environment | diff --git a/plugins/toolbox/toolbox.plugin.zsh b/plugins/toolbox/toolbox.plugin.zsh index 8b6bf5ecd..d24d6d396 100644 --- a/plugins/toolbox/toolbox.plugin.zsh +++ b/plugins/toolbox/toolbox.plugin.zsh @@ -1,3 +1,5 @@ function toolbox_prompt_info() { [[ -f /run/.toolboxenv ]] && echo "⬢" } + +alias tb="toolbox enter" From 8168ec0174e7e3212be20ecc74810155772abff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 15 Jun 2022 20:07:35 +0200 Subject: [PATCH 3/4] refactor!: remove deprecated plugins BREAKING CHANGE: the following deprecated plugins have been removed: `cargo`, `copydir`, `npx`, `osx`, and `rustup`. See the wiki for more info: https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins#removed refactor(rustup)!: remove deprecated plugin BREAKING CHANGE: the plugin was deprecated and is now removed. See the wiki for more info: https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins#removed --- plugins/cargo/README.md | 3 --- plugins/cargo/cargo.plugin.zsh | 7 ------- plugins/copydir/README.md | 3 --- plugins/copydir/copydir.plugin.zsh | 7 ------- plugins/npx/README.md | 16 ---------------- plugins/npx/npx.plugin.zsh | 12 ------------ plugins/osx/README.md | 3 --- plugins/osx/osx.plugin.zsh | 5 ----- plugins/rustup/README.md | 3 --- plugins/rustup/rustup.plugin.zsh | 7 ------- 10 files changed, 66 deletions(-) delete mode 100644 plugins/cargo/README.md delete mode 100644 plugins/cargo/cargo.plugin.zsh delete mode 100644 plugins/copydir/README.md delete mode 100644 plugins/copydir/copydir.plugin.zsh delete mode 100644 plugins/npx/README.md delete mode 100644 plugins/npx/npx.plugin.zsh delete mode 100644 plugins/osx/README.md delete mode 100644 plugins/osx/osx.plugin.zsh delete mode 100644 plugins/rustup/README.md delete mode 100644 plugins/rustup/rustup.plugin.zsh diff --git a/plugins/cargo/README.md b/plugins/cargo/README.md deleted file mode 100644 index 93e69ae7f..000000000 --- a/plugins/cargo/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# cargo - -**Deprecated: use the [`rust`](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rust) plugin instead.** diff --git a/plugins/cargo/cargo.plugin.zsh b/plugins/cargo/cargo.plugin.zsh deleted file mode 100644 index 692025e8f..000000000 --- a/plugins/cargo/cargo.plugin.zsh +++ /dev/null @@ -1,7 +0,0 @@ -print ${(%):-'%F{yellow}The `cargo` plugin is deprecated and has been moved to the `rust` plugin.'} -print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'} - -(( ${fpath[(Ie)$ZSH/plugins/rust]} )) || { - fpath=("$ZSH/plugins/rust" $fpath) - source "$ZSH/plugins/rust/rust.plugin.zsh" -} diff --git a/plugins/copydir/README.md b/plugins/copydir/README.md deleted file mode 100644 index cf24b789f..000000000 --- a/plugins/copydir/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# copydir plugin - -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 deleted file mode 100644 index a2b489ec0..000000000 --- a/plugins/copydir/copydir.plugin.zsh +++ /dev/null @@ -1,7 +0,0 @@ -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 { - copypath -} diff --git a/plugins/npx/README.md b/plugins/npx/README.md deleted file mode 100644 index 4b2aba8f0..000000000 --- a/plugins/npx/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# npx plugin - -## Deprecation - -Since npm v7, `npx` has been moved to `npm exec`. With the move, [the `--shell-auto-fallback` argument -for `npx` has been removed](https://github.com/npm/cli/blob/v7.0.0/docs/content/cli-commands/npm-exec.md#compatibility-with-older-npx-versions): - -> Shell fallback functionality is removed, as it is not advisable. - -When using npm v7, you'll get this error: - -> npx: the --shell-auto-fallback argument has been removed - -If you get this error, just disable the plugin by removing it from the plugins array in your zshrc file. -This plugin will no longer be maintained and will be removed in the future, when the older `npx` versions -are no longer available. diff --git a/plugins/npx/npx.plugin.zsh b/plugins/npx/npx.plugin.zsh deleted file mode 100644 index c1e2eca98..000000000 --- a/plugins/npx/npx.plugin.zsh +++ /dev/null @@ -1,12 +0,0 @@ -if (( ! $+commands[npx] )); then - return -fi - -if ! npx_fallback_script="$(npx --shell-auto-fallback zsh 2>/dev/null)"; then - print -u2 ${(%):-"%F{yellow}This \`npx\` version ($(npx --version)) is not supported.%f"} -else - source <(<<< "$npx_fallback_script") -fi - -print -u2 ${(%):-"%F{yellow}The \`npx\` plugin is deprecated and will be removed soon. %BPlease disable it%b.%f"} -unset npx_fallback_script diff --git a/plugins/osx/README.md b/plugins/osx/README.md deleted file mode 100644 index 98d859545..000000000 --- a/plugins/osx/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# 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 deleted file mode 100644 index 3b0935981..000000000 --- a/plugins/osx/osx.plugin.zsh +++ /dev/null @@ -1,5 +0,0 @@ -print -u2 ${(%):-'%F{yellow}The `osx` plugin is deprecated and has been renamed to `macos`.'} -print -u2 ${(%):-'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" diff --git a/plugins/rustup/README.md b/plugins/rustup/README.md deleted file mode 100644 index c620e72a8..000000000 --- a/plugins/rustup/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rustup - -**Deprecated: use the [`rust`](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rust) plugin instead.** diff --git a/plugins/rustup/rustup.plugin.zsh b/plugins/rustup/rustup.plugin.zsh deleted file mode 100644 index ef141cf8f..000000000 --- a/plugins/rustup/rustup.plugin.zsh +++ /dev/null @@ -1,7 +0,0 @@ -print ${(%):-'%F{yellow}The `rustup` plugin is deprecated and has been moved to the `rust` plugin.'} -print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'} - -(( ${fpath[(Ie)$ZSH/plugins/rust]} )) || { - fpath=("$ZSH/plugins/rust" $fpath) - source "$ZSH/plugins/rust/rust.plugin.zsh" -} From 4c82a2eedf0c43d47601ffa8b0303ed1326fab8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= Date: Sun, 19 Jun 2022 12:32:16 +0200 Subject: [PATCH 4/4] fix(emacs): fix check for open frames w/ extra output (#10992) --- plugins/emacs/emacsclient.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh index 25efe0d68..96893c932 100755 --- a/plugins/emacs/emacsclient.sh +++ b/plugins/emacs/emacsclient.sh @@ -11,7 +11,7 @@ emacsfun() { esac # Check if there are suitable frames - frames="$(emacsclient -a '' -n -e "$cmd" 2>/dev/null)" + frames="$(emacsclient -a '' -n -e "$cmd" 2>/dev/null |sed 's/.*\x07//g' )" # Only create another X frame if there isn't one present if [ -z "$frames" -o "$frames" = nil ]; then