From e1b46bddc34e7da642a2f7dfa2e922399bf89f9b Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 25 Jan 2023 03:19:11 +0100 Subject: [PATCH] zsh,git: Add completion for git-https-and-ssh Complete remotes. Also remove redundant compdef lines. The _git- functions are used automatically. --- .config/zsh/zshrc.d/20-completion.zsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.config/zsh/zshrc.d/20-completion.zsh b/.config/zsh/zshrc.d/20-completion.zsh index e45fb0d..d85874e 100644 --- a/.config/zsh/zshrc.d/20-completion.zsh +++ b/.config/zsh/zshrc.d/20-completion.zsh @@ -50,11 +50,9 @@ compdef nvim-man=man # and `git cow`). _git-checkout-worktree() { _git-checkout } _git-commit-last-msg() { _git-commit } +_git-https-and-ssh() { __git_remotes } compdef _git-log glog -# TODO: simple for loop for autoload/git/git-* -compdef _git-checkout-worktree git-checkout-worktree -compdef _git-commit-last-msg git-commit-last-msg # Run git's completion once to avoid a `command not found` error when using the # completion functions on other programs without having completed something for