gh: add shell completions (#10524)
This commit is contained in:
parent
211ef4d832
commit
e70ca1281e
|
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="GitHub’s official command line tool"
|
|||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Krishna kanhaiya @kcubeterm"
|
||||
TERMUX_PKG_VERSION="2.9.0"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/cli/cli/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=730b600d33afb67d84af4dca1af80cb1fbff79d302ac4f840fc8e9e4c25fceb7
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
@ -29,3 +30,22 @@ termux_step_make_install() {
|
|||
install -Dm700 -t "$TERMUX_PREFIX"/bin "$GOPATH"/src/github.com/cli/cli/cmd/gh/gh
|
||||
install -Dm600 -t "$TERMUX_PREFIX"/share/doc/gh/ "$TERMUX_PKG_SRCDIR"/docs/*
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
cat <<-EOF >./postinst
|
||||
#!${TERMUX_PREFIX}/bin/sh
|
||||
mkdir -p ${TERMUX_PREFIX}/share/bash-completion/completions
|
||||
mkdir -p ${TERMUX_PREFIX}/share/zsh/site-functions
|
||||
mkdir -p ${TERMUX_PREFIX}/share/fish/vendor_completions.d
|
||||
gh completion -s bash > ${TERMUX_PREFIX}/share/bash-completion/completions/gh.bash
|
||||
gh completion -s zsh > ${TERMUX_PREFIX}/share/zsh/site-functions/_gh
|
||||
gh completion -s fish > ${TERMUX_PREFIX}/share/fish/vendor_completions.d/gh.fish
|
||||
EOF
|
||||
|
||||
cat <<-EOF >./prerm
|
||||
#!${TERMUX_PREFIX}/bin/sh
|
||||
rm -f ${TERMUX_PREFIX}/share/bash-completion/completions/gh.bash
|
||||
rm -f ${TERMUX_PREFIX}/share/zsh/site-functions/_gh
|
||||
rm -f ${TERMUX_PREFIX}/share/fish/vendor_completions.d/gh.fish
|
||||
EOF
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue