From 5a282b9b3050e4851c15cfdb9d79af6a708988b7 Mon Sep 17 00:00:00 2001 From: Artyom Fedosov <50590380+artyom-fedosov@users.noreply.github.com> Date: Fri, 14 Nov 2025 15:21:32 +0200 Subject: [PATCH] chore(git): remove quotes around `$#` (#13403) --- plugins/git/git.plugin.zsh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index a0052891a..c11799208 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -102,7 +102,7 @@ function work_in_progress() { alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' function ggpnp() { - if [[ "$#" == 0 ]]; then + if [[ $# == 0 ]]; then ggl && ggp else ggl "${*}" && ggp "${*}" @@ -281,7 +281,7 @@ alias gprav='git pull --rebase --autostash -v' function ggu() { local b - [[ "$#" != 1 ]] && b="$(git_current_branch)" + [[ $# != 1 ]] && b="$(git_current_branch)" git pull --rebase origin "${b:-$1}" } compdef _git ggu=git-pull @@ -293,11 +293,11 @@ alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)' alias ggpull='git pull origin "$(git_current_branch)"' function ggl() { - if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then + if [[ $# != 0 ]] && [[ $# != 1 ]]; then git pull origin "${*}" else local b - [[ "$#" == 0 ]] && b="$(git_current_branch)" + [[ $# == 0 ]] && b="$(git_current_branch)" git pull origin "${b:-$1}" fi } @@ -310,7 +310,7 @@ alias gpd='git push --dry-run' function ggf() { local b - [[ "$#" != 1 ]] && b="$(git_current_branch)" + [[ $# != 1 ]] && b="$(git_current_branch)" git push --force origin "${b:-$1}" } compdef _git ggf=git-push @@ -322,7 +322,7 @@ is-at-least 2.30 "$git_version" \ function ggfl() { local b - [[ "$#" != 1 ]] && b="$(git_current_branch)" + [[ $# != 1 ]] && b="$(git_current_branch)" git push --force-with-lease origin "${b:-$1}" } compdef _git ggfl=git-push @@ -337,11 +337,11 @@ alias gpod='git push origin --delete' alias ggpush='git push origin "$(git_current_branch)"' function ggp() { - if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then + if [[ $# != 0 ]] && [[ $# != 1 ]]; then git push origin "${*}" else local b - [[ "$#" == 0 ]] && b="$(git_current_branch)" + [[ $# == 0 ]] && b="$(git_current_branch)" git push origin "${b:-$1}" fi }