[arch-commits] Commit in code/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Thu Aug 15 21:56:37 UTC 2019


    Date: Thursday, August 15, 2019 @ 21:56:36
  Author: eschwartz
Revision: 499639

upgpkg: code 1.37.0-2

fix shell completions

- bash-completion should be symlinked with relative paths
- zsh completion should not be installed to Debian-specific vendor-completions,
  which does not exist on Arch and won't be used
- instead of making two copies of zsh completion, tell zsh to use that
  completion service for both command names via "#compdef code code-oss"

Modified:
  code/trunk/PKGBUILD

----------+
 PKGBUILD |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-15 20:11:32 UTC (rev 499638)
+++ PKGBUILD	2019-08-15 21:56:36 UTC (rev 499639)
@@ -6,7 +6,7 @@
 pkgdesc='The Open Source build of Visual Studio Code (vscode) editor'
 # Remember to check https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites for target node version
 pkgver=1.37.0
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 url='https://github.com/microsoft/vscode'
 license=('MIT')
@@ -77,7 +77,7 @@
   sed -i 's|complete -F _code code|complete -F _code code code-oss|' resources/completions/bash/code
   # Create new zsh completion file for our binary
   cp resources/completions/zsh/_code resources/completions/zsh/_code-oss
-  sed -i 's|#compdef code|#compdef code-oss|' resources/completions/zsh/_code-oss
+  sed -i 's|#compdef code|#compdef code code-oss|' resources/completions/zsh/_code-oss
 
   # Fix bin path
   sed -i "s|return path.join(path.dirname(execPath), 'bin', \`\${product.applicationName}\`);|return '/usr/bin/code';|g
@@ -132,9 +132,8 @@
 
   # Install bash and zsh completions
   install -Dm 644 $pkgname/resources/completions/bash/code "$pkgdir"/usr/share/bash-completion/completions/code-oss
-  ln -sf /usr/share/bash-completion/completions/code-oss "$pkgdir"/usr/share/bash-completion/completions/code
-  install -Dm 644 $pkgname/resources/completions/zsh/_code-oss "$pkgdir"/usr/share/zsh/vendor-completions/_code-oss
-  install -Dm 644 $pkgname/resources/completions/zsh/_code "$pkgdir"/usr/share/zsh/vendor-completions/_code
+  ln -s code-oss "$pkgdir"/usr/share/bash-completion/completions/code
+  install -Dm 644 $pkgname/resources/completions/zsh/_code-oss "$pkgdir"/usr/share/zsh/site-functions/_code-oss
 
   # Install license files
   install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE


More information about the arch-commits mailing list