Skip to content

Commit

Permalink
Review comments - remove unnecessary if
Browse files Browse the repository at this point in the history
  • Loading branch information
cjappl committed Feb 3, 2024
1 parent 167b1d0 commit 71dd1e5
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions completions/_git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,24 @@ _git-forgit() {
esac
}

# Check if forgit plugin is loaded
if (( $+functions[forgit::add] )); then
# We're reusing existing completion functions, so load those first
# if not already loaded and check if completion function exists afterwards.
(( $+functions[_git-add] )) || _git
(( $+functions[_git-add] )) || return 1
# Completions for forgit plugin shell functions (also works for aliases)
compdef _git-add forgit::add
compdef _git-branches forgit::branch::delete
compdef _git-branches forgit::checkout::branch
compdef __git_recent_commits forgit::checkout::commit
compdef _git-checkout-file forgit::checkout::file
compdef __git_tags forgit::checkout::tag
compdef _git-cherry-pick forgit::cherry::pick
compdef _git-branches forgit::cherry::pick::from::branch
compdef _git-clean forgit::clean
compdef _git-forgit-diff forgit::diff
compdef __git_branch_names forgit::fixup
compdef _git-log forgit::log
compdef _git-rebase forgit::rebase
compdef _git-staged forgit::reset::head
compdef __git_recent_commits forgit::revert::commit
compdef _git-stash-show forgit::stash::show
fi
# We're reusing existing completion functions, so load those first
# if not already loaded and check if completion function exists afterwards.
(( $+functions[_git-add] )) || _git
(( $+functions[_git-add] )) || return 1
# Completions for forgit plugin shell functions (also works for aliases)
compdef _git-add forgit::add
compdef _git-branches forgit::branch::delete
compdef _git-branches forgit::checkout::branch
compdef __git_recent_commits forgit::checkout::commit
compdef _git-checkout-file forgit::checkout::file
compdef __git_tags forgit::checkout::tag
compdef _git-cherry-pick forgit::cherry::pick
compdef _git-branches forgit::cherry::pick::from::branch
compdef _git-clean forgit::clean
compdef _git-forgit-diff forgit::diff
compdef __git_branch_names forgit::fixup
compdef _git-log forgit::log
compdef _git-rebase forgit::rebase
compdef _git-staged forgit::reset::head
compdef __git_recent_commits forgit::revert::commit
compdef _git-stash-show forgit::stash::show

0 comments on commit 71dd1e5

Please # to comment.