Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#69787 - [github-cli] Missing shell completion

Attached to Project: Community Packages
Opened by Marcin Puc (Tranzystorek) - Thursday, 25 February 2021, 22:06 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 06 March 2021, 12:31 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Eli Schwartz (eschwartz)
Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
The newest 1.6.2 build of github-cli seems to have broken shell completion file instalation (there are no completion files in the package list, and the completion does not work)

Additional info:
* package version: 1.6.2
This task depends upon

Closed by  Morten Linderud (Foxboron)
Saturday, 06 March 2021, 12:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with 1.7.0-2
Comment by Kr1ss X (Kr1ss) - Friday, 26 February 2021, 00:27 GMT
I noticed that as well; `make install` doesn't take care of the shell completion files (EDIT/ the previous version of the package, 1.5.0-1, _did_ ship them). Basically, I solved this by creating them in `package()` :

```diff
diff --git i/trunk/PKGBUILD w/trunk/PKGBUILD
index 1edaa7f8..9d9d083c 100644
--- i/trunk/PKGBUILD
+++ w/trunk/PKGBUILD
@@ -4,7 +4,7 @@

pkgname=github-cli
pkgver=1.6.2
-pkgrel=1
+pkgrel=2
pkgdesc="The GitHub CLI"
arch=("x86_64")
url="https://github.com/cli/cli"
@@ -32,9 +32,6 @@ build()
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external"

make GH_VERSION="v$pkgver" bin/gh manpages
- bin/gh completion -s bash | install -Dm644 /dev/stdin share/bash-completion/completions/gh
- bin/gh completion -s zsh | install -Dm644 /dev/stdin share/zsh/site-functions/_gh
- bin/gh completion -s fish | install -Dm644 /dev/stdin share/fish/vendor_completions.d/gh.fish
}

check(){
@@ -50,6 +47,12 @@ check()
package() {
cd "cli-$pkgver"
make DESTDIR="${pkgdir}" prefix="/usr" install
+ bin/gh completion -s bash | \
+ install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/gh"
+ bin/gh completion -s zsh | \
+ install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_gh"
+ bin/gh completion -s fish | \
+ install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/gh.fish"
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
}
```
Comment by Morten Linderud (Foxboron) - Friday, 26 February 2021, 11:23 GMT Comment by Marcin Puc (Tranzystorek) - Saturday, 06 March 2021, 11:12 GMT
Any updates? Version 1.7.0 has been released, but this still isn't fixed...
Comment by Morten Linderud (Foxboron) - Saturday, 06 March 2021, 12:19 GMT
Aaaahhhh, I forgot! Sorry :)

Loading...