From a3c579bf27b34942d4c6ad64e7cfd75788b05ea3 Mon Sep 17 00:00:00 2001 From: Nur Rony <2513341+nurrony@users.noreply.github.com> Date: Mon, 26 Dec 2022 14:41:30 +0600 Subject: [PATCH 1/9] feat(maven): add `quarkus` command support (#11405) --- plugins/mvn/mvn.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 151fbd2a6..da51f74df 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -196,7 +196,7 @@ function listMavenCompletions { # spring-boot spring-boot:run spring-boot:repackage # quarkus - quarkus:dev quarkus:list-extensions quarkus:add-extension quarkus:add-extensions quarkus:generate-config quarkus:help + quarkus:dev quarkus:list-extensions quarkus:add-extension quarkus:add-extensions quarkus:remove-extension quarkus:remove-extensions quarkus:generate-config quarkus:help # exec exec:exec exec:java # versions @@ -287,7 +287,7 @@ function listMavenCompletions { vaadin:prepare-frontend vaadin:build-frontend vaadin:clean-frontend vaadin:dance # options - "-Dmaven.test.skip=true" -DskipTests -DskipITs -Dmaven.surefire.debug -DenableCiProfile "-Dpmd.skip=true" "-Dcheckstyle.skip=true" "-Dtycho.mode=maven" "-Dmaven.test.failure.ignore=true" "-DgroupId=" "-DartifactId=" "-Dversion=" "-Dpackaging=jar" "-Dfile=" + "-Dmaven.test.skip=true" -DskipTests -DskipITs -Dmaven.surefire.debug -DenableCiProfile "-Dpmd.skip=true" "-Dcheckstyle.skip=true" "-Dtycho.mode=maven" "-Dmaven.test.failure.ignore=true" "-DgroupId=" "-DartifactId=" "-Dversion=" "-Dpackaging=jar" "-Dfile=" "-Dextensions=" # arguments -am --also-make From 55e4e6c73b2bb067974c6d49ba9da2ba1ee3295c Mon Sep 17 00:00:00 2001 From: "the.brain.w" Date: Fri, 30 Dec 2022 11:52:18 +0100 Subject: [PATCH 2/9] feat(systemd): add support for user units in prompt (#11417) --- plugins/systemd/systemd.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh index 7afd2be58..1270bea0e 100644 --- a/plugins/systemd/systemd.plugin.zsh +++ b/plugins/systemd/systemd.plugin.zsh @@ -107,6 +107,8 @@ function systemd_prompt_info { if systemctl is-active "$unit" &>/dev/null; then echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE" + elif systemctl --user is-active "$unit" &>/dev/null; then + echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE" else echo -n "$ZSH_THEME_SYSTEMD_PROMPT_NOTACTIVE" fi From 6710fd588aec2c0cb90e70c02db0837c3646af99 Mon Sep 17 00:00:00 2001 From: Ennio Mara Date: Mon, 2 Jan 2023 21:32:45 +0100 Subject: [PATCH 3/9] fix(autojump): fix autojump sourcing in nix (-darwin) (#11422) * fix(autojump): fix autojump sourcing in nix (-darwin) This plugin expects to source an sh/zsh file which sets up autojump, but that is not done when running Nix on macos using nix-darwin. Looking at the old value (/etc/profiles/per-user/$USER/bin/autojump), it points to a binary file instead of the setup script. * Use zsh file instead of sh --- plugins/autojump/autojump.plugin.zsh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index e11f231b6..9bc190bdc 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,18 +1,18 @@ declare -a autojump_paths autojump_paths=( - $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation - $HOME/.autojump/share/autojump/autojump.zsh # manual installation - $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation - /run/current-system/sw/share/autojump/autojump.zsh # NixOS installation - /usr/share/autojump/autojump.zsh # Debian and Ubuntu package - /etc/profile.d/autojump.zsh # manual installation - /etc/profile.d/autojump.sh # Gentoo installation - /usr/local/share/autojump/autojump.zsh # FreeBSD installation - /usr/pkg/share/autojump/autojump.zsh # NetBSD installation - /opt/local/etc/profile.d/autojump.sh # macOS with MacPorts - /usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default) - /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs) - /etc/profiles/per-user/$USER/bin/autojump # macOS Nix, Home Manager and flakes + $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation + $HOME/.autojump/share/autojump/autojump.zsh # manual installation + $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation + /run/current-system/sw/share/autojump/autojump.zsh # NixOS installation + /usr/share/autojump/autojump.zsh # Debian and Ubuntu package + /etc/profile.d/autojump.zsh # manual installation + /etc/profile.d/autojump.sh # Gentoo installation + /usr/local/share/autojump/autojump.zsh # FreeBSD installation + /usr/pkg/share/autojump/autojump.zsh # NetBSD installation + /opt/local/etc/profile.d/autojump.sh # macOS with MacPorts + /usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default) + /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs) + /etc/profiles/per-user/$USER/etc/profile.d/autojump.zsh # macOS Nix, Home Manager and flakes ) for file in $autojump_paths; do From 36f1055eeea0f455676381539fcb3e6e0a4da731 Mon Sep 17 00:00:00 2001 From: Ennio Mara Date: Mon, 2 Jan 2023 21:55:47 +0100 Subject: [PATCH 4/9] fix(autojump): use sh file instead of zsh in NixOS (#11425) --- plugins/autojump/autojump.plugin.zsh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 9bc190bdc..1b868ee8d 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,18 +1,18 @@ declare -a autojump_paths autojump_paths=( - $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation - $HOME/.autojump/share/autojump/autojump.zsh # manual installation - $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation - /run/current-system/sw/share/autojump/autojump.zsh # NixOS installation - /usr/share/autojump/autojump.zsh # Debian and Ubuntu package - /etc/profile.d/autojump.zsh # manual installation - /etc/profile.d/autojump.sh # Gentoo installation - /usr/local/share/autojump/autojump.zsh # FreeBSD installation - /usr/pkg/share/autojump/autojump.zsh # NetBSD installation - /opt/local/etc/profile.d/autojump.sh # macOS with MacPorts - /usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default) - /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs) - /etc/profiles/per-user/$USER/etc/profile.d/autojump.zsh # macOS Nix, Home Manager and flakes + $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation + $HOME/.autojump/share/autojump/autojump.zsh # manual installation + $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation + /run/current-system/sw/share/autojump/autojump.zsh # NixOS installation + /usr/share/autojump/autojump.zsh # Debian and Ubuntu package + /etc/profile.d/autojump.zsh # manual installation + /etc/profile.d/autojump.sh # Gentoo installation + /usr/local/share/autojump/autojump.zsh # FreeBSD installation + /usr/pkg/share/autojump/autojump.zsh # NetBSD installation + /opt/local/etc/profile.d/autojump.sh # macOS with MacPorts + /usr/local/etc/profile.d/autojump.sh # macOS with Homebrew (default) + /opt/homebrew/etc/profile.d/autojump.sh # macOS with Homebrew (default on M1 macs) + /etc/profiles/per-user/$USER/etc/profile.d/autojump.sh # macOS Nix, Home Manager and flakes ) for file in $autojump_paths; do From 00c37b6991895aac0398a24d7d8b78cda63dec05 Mon Sep 17 00:00:00 2001 From: Alastair Rankine Date: Tue, 3 Jan 2023 03:44:53 -0500 Subject: [PATCH 5/9] feat(pipenv): standarize completion generation (#11424) Co-authored-by: Carlo Sala Closes #11423 --- plugins/pipenv/pipenv.plugin.zsh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/plugins/pipenv/pipenv.plugin.zsh b/plugins/pipenv/pipenv.plugin.zsh index 4be61a920..244bd6b7c 100644 --- a/plugins/pipenv/pipenv.plugin.zsh +++ b/plugins/pipenv/pipenv.plugin.zsh @@ -1,8 +1,16 @@ -# Pipenv completion -_pipenv() { - eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv) -} -compdef _pipenv pipenv +if (( ! $+commands[pipenv] )); then + return +fi + +# If the completion file doesn't exist yet, we need to autoload it and +# bind it to `pipenv`. Otherwise, compinit will have already done that. +if [[ ! -f "$ZSH_CACHE_DIR/completions/_pipenv" ]]; then + typeset -g -A _comps + autoload -Uz _pipenv + _comps[pipenv]=_pipenv +fi + +_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &| # Automatic pipenv shell activation/deactivation _togglePipenvShell() { From 3fca9c8933afc5c118a73cedb171a3c7b8e92730 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Tue, 3 Jan 2023 10:02:03 +0100 Subject: [PATCH 6/9] fix(upgrade): check if git is available and working macOS seems to break dev tools when updating the system. This should prevent the previous issues. See #11309 Closes #11420 --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index cc527e72d..3a6bb6555 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -24,7 +24,7 @@ zstyle -s ':omz:update' mode update_mode || { # - git is unavailable on the system. if [[ "$update_mode" = disabled ]] \ || [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \ - || ! command -v git &>/dev/null; then + || ! command git --version 2>&1 >/dev/null; then unset update_mode return fi From 280c99dae691e468d12c94f64c97964b88cdad4e Mon Sep 17 00:00:00 2001 From: ZigZagT Date: Thu, 5 Jan 2023 15:03:12 -0800 Subject: [PATCH 7/9] feat(git): accept `default` and `mainline` as main branches (#11431) --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 69745730c..76e58a121 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -31,7 +31,7 @@ function work_in_progress() { function git_main_branch() { command git rev-parse --git-dir &>/dev/null || return local ref - for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk}; do + for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do if command git show-ref -q --verify $ref; then echo ${ref:t} return From 71ca38652b039c41ef9b415d0fc05926c37a0bfb Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Fri, 6 Jan 2023 00:14:33 +0100 Subject: [PATCH 8/9] fix(git-extras): type properly `__gitex_command_successful` calls Closes #11430 --- plugins/git-extras/git-extras.plugin.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/git-extras/git-extras.plugin.zsh b/plugins/git-extras/git-extras.plugin.zsh index b86d7c5b6..6b96e12af 100644 --- a/plugins/git-extras/git-extras.plugin.zsh +++ b/plugins/git-extras/git-extras.plugin.zsh @@ -51,7 +51,7 @@ __gitex_remote_names() { local expl declare -a remote_names remote_names=(${(f)"$(_call_program remotes git remote 2>/dev/null)"}) - __git_command_successful || return + __gitex_command_successful || return _wanted remote-names expl remote-name compadd $* - $remote_names } @@ -59,7 +59,7 @@ __gitex_tag_names() { local expl declare -a tag_names tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/}) - __git_command_successful || return + __gitex_command_successful || return _wanted tag-names expl tag-name compadd $* - $tag_names } @@ -68,7 +68,7 @@ __gitex_branch_names() { local expl declare -a branch_names branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/}) - __git_command_successful || return + __gitex_command_successful || return _wanted branch-names expl branch-name compadd $* - $branch_names } @@ -76,7 +76,7 @@ __gitex_specific_branch_names() { local expl declare -a branch_names branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/}) - __git_command_successful || return + __gitex_command_successful || return _wanted branch-names expl branch-name compadd - $branch_names } @@ -100,7 +100,7 @@ __gitex_submodule_names() { local expl declare -a submodule_names submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"}) # ' - __git_command_successful || return + __gitex_command_successful || return _wanted submodule-names expl submodule-name compadd $* - $submodule_names } @@ -109,7 +109,7 @@ __gitex_author_names() { local expl declare -a author_names author_names=(${(f)"$(_call_program branchrefs git log --format='%aN' | sort -u)"}) - __git_command_successful || return + __gitex_command_successful || return _wanted author-names expl author-name compadd $* - $author_names } From 69dfd7758033b3e771dcd184c1b143d166a85481 Mon Sep 17 00:00:00 2001 From: Maksym Date: Fri, 6 Jan 2023 14:39:45 +0000 Subject: [PATCH 9/9] chore: remove maksyms as maintainer of aws plugin (#11432) I'm afraid I no longer use `ohmyzsh` or even `zsh` in favour of `fish`. Hence, it doesn't make sense for me to continue being the code owner for the plugin. Good luck with an amazing tool! --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c6b3e8ce9..6668cd7ce 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,5 @@ # Plugin owners plugins/archlinux/ @ratijas -plugins/aws/ @maksyms plugins/genpass/ @atoponce plugins/git-lfs/ @hellovietduc plugins/gitfast/ @felipec