#compdef cdrepo # https://unix.stackexchange.com/a/240192 # https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Completion-Functions _cdrepo () { _arguments \ '1:Repo place:(GitLab-repos GitHub-repos source)' \ "2:Repo:_files -W ~/Programming/${words[2]} -/" } _cdrepo "$@"