I use oh my zsh, with the git plugin, which provides autocompletion for the most common actions (for example, branch deletion).
I wanted to write an alias that deletes a local branch, and also the associate remote branch, while still getting autocompletion, however, when I associate an alias to a shell script, autocompletion doesn't work as intended.
For example, with this alias:
full_delete = !sh -c 'git branch -D $1 && git push origin :$1' -
the autocompletion lists the files, but not the branches.
Is there any way to provide branch autocompletion for an alias like this (or anyway, an strategy to fulfill the requirement)?