diff options
author | Numeral | 2022-06-23 01:19:22 -0500 |
---|---|---|
committer | Numeral | 2022-06-23 01:19:22 -0500 |
commit | 247939d3e6d1a033be5580228b19ec2617439cd7 (patch) | |
tree | 342ab03681ab3b27777bfc91787a69da1c34d854 | |
parent | aff90dd870c1a8b1addd22c3cc5826a2b13574e5 (diff) | |
download | aur-247939d3e6d1a033be5580228b19ec2617439cd7.tar.gz |
fixed zsh completions
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 9 insertions, 6 deletions
@@ -1,7 +1,7 @@ pkgbase = graphite-cli-git pkgdesc = CLI that makes creating stacked git changes fast & intuitive pkgver = 0.19.2.r0.9df94d9d - pkgrel = 2 + pkgrel = 3 url = https://graphite.dev/ arch = any license = AGPL3 @@ -4,7 +4,7 @@ pkgname=graphite-cli-git pkgver=0.19.2.r0.9df94d9d -pkgrel=2 +pkgrel=3 pkgdesc="CLI that makes creating stacked git changes fast & intuitive" url=https://graphite.dev/ license=('AGPL3') @@ -43,6 +43,9 @@ build() { # when generating completions SHELL=bash node ./dist/src/index.js completion > "$srcdir/pre-bash-graphite-completions" SHELL=zsh node ./dist/src/index.js completion > "$srcdir/pre-zsh-graphite-completions" + + # make the completion script suitable to be a loadable function + sed 's/compdef _index.js_yargs_completions index.js/_index.js_yargs_completions/' -i "$srcdir/pre-zsh-graphite-completions" # make it so autocompletion works for both graphite and gt on both zsh and bash @@ -57,9 +60,9 @@ build() { package() { # npm is a lot better than yarn at installing global packages in a way that is friendly to packages. npm install -g --no-audit --prefix "$pkgdir/usr" "$srcdir/graphite-cli.tgz" - install -D "$srcdir/zsh-graphite-completions" "$pkgdir/usr/share/zsh/site-functions/_graphite" - install -D "$srcdir/zsh-gt-completions" "$pkgdir/usr/share/zsh/site-functions/_gt" - install -D "$srcdir/bash-graphite-completions" "$pkgdir/usr/share/bash-completion/completions/graphite" - install -D "$srcdir/bash-gt-completions" "$pkgdir/usr/share/bash-completion/completions/gt" + install -D --mode=u=rw,go=r "$srcdir/zsh-graphite-completions" "$pkgdir/usr/share/zsh/site-functions/_graphite" + install -D --mode=u=rw,go=r "$srcdir/zsh-gt-completions" "$pkgdir/usr/share/zsh/site-functions/_gt" + install -D --mode=u=rw,go=r "$srcdir/bash-graphite-completions" "$pkgdir/usr/share/bash-completion/completions/graphite" + install -D --mode=u=rw,go=r "$srcdir/bash-gt-completions" "$pkgdir/usr/share/bash-completion/completions/gt" chown -R root:root "$pkgdir" } |