Zsh gh completion: Add alias completion

This commit is contained in:
Adin Klotz 2020-08-20 21:44:31 -04:00
parent c3f0cabe84
commit 59c76d1a2e
1 changed files with 7 additions and 1 deletions

View File

@ -92,8 +92,14 @@ function _gh_alias {
esac esac
} }
function __aliases {
local options=$(gh alias list | awk -F '\t' '{print $1 "\\:" "\"" $2 "\""}' | tr '\n' ' ')
echo $options
}
function _gh_alias_delete { function _gh_alias_delete {
_arguments \ _arguments -C \
"1:Alias:(($(__aliases)))" \
'--help[Show help for command]' '--help[Show help for command]'
} }