mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Zsh gh completion: Add alias completion
This commit is contained in:
@@ -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]'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user