_mu_autocomplete() {
local cur prev words cword
_get_comp_words_by_ref -n : cur prev words cword
# Check if the command starts with 'mu'
if [[ "${words[0]}" == "mu" ]]; then
# Remove 'mu' from the words and forward to Git's autocompletion
COMP_WORDS=("${COMP_WORDS[@]:1}")
COMP_CWORD=$((COMP_CWORD - 1))
# Simulate git command after removing 'mu'
_git
return 0
fi
_mu_autocomplete() { local cur prev words cword _get_comp_words_by_ref -n : cur prev words cword
}
Enable autocompletion for 'mu' command
complete -F _mu_autocomplete mu
doesnt work for me :(