1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00
prezto/modules/git/functions/_git-hub-shorten-url
Indrajit Raychaudhuri 043d09bbfe [git] Support short-code and improve completion in 'git-hub-shorten-url'
Changes:
- Add optional short-code support
- Improve completion for github.com URL (`http(s)://*.github.com` only)
- Return with non-zero exit code appropriately
2017-11-28 16:45:28 -08:00

17 lines
369 B
Plaintext

#compdef git-hub-shorten-url
#autoload
#
# Completes git-hub-shorten-url.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local service="$service"
zstyle ":completion:*:${service}:*:prefixes" ignored-patterns '^http(|s)://'
zstyle ":completion:*:${service}:*:hosts" ignored-patterns '^*github.com'
_arguments '1::GitHub URL:_urls' '2::code:' && return 0