mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
Merge pull request #326922 from terlar/google-cloud-sdk-fish-completions
This commit is contained in:
commit
8a3aab0d46
@ -7,7 +7,7 @@
|
||||
# 3) used by `google-cloud-sdk` only on GCE guests
|
||||
#
|
||||
|
||||
{ stdenv, lib, fetchurl, makeWrapper, python, openssl, jq, callPackage, with-gce ? false }:
|
||||
{ stdenv, lib, fetchurl, makeWrapper, python, openssl, jq, callPackage, installShellFiles, with-gce ? false }:
|
||||
|
||||
let
|
||||
pythonEnv = python.withPackages (p: with p; [
|
||||
@ -36,7 +36,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ python ];
|
||||
|
||||
nativeBuildInputs = [ jq makeWrapper ];
|
||||
nativeBuildInputs = [ jq makeWrapper installShellFiles ];
|
||||
|
||||
patches = [
|
||||
# For kubectl configs, don't store the absolute path of the `gcloud` binary as it can be garbage-collected
|
||||
@ -90,6 +90,12 @@ in stdenv.mkDerivation rec {
|
||||
# zsh doesn't load completions from $FPATH without #compdef as the first line
|
||||
sed -i '1 i #compdef gcloud' $out/share/zsh/site-functions/_gcloud
|
||||
|
||||
# setup fish completion
|
||||
installShellCompletion --cmd gcloud \
|
||||
--fish <(echo "complete -c gcloud -f -a '(__fish_argcomplete_complete gcloud)'")
|
||||
installShellCompletion --cmd gsutil \
|
||||
--fish <(echo "complete -c gsutil -f -a '(__fish_argcomplete_complete gsutil)'")
|
||||
|
||||
# This directory contains compiled mac binaries. We used crcmod from
|
||||
# nixpkgs instead.
|
||||
rm -r $out/google-cloud-sdk/platform/gsutil/third_party/crcmod \
|
||||
|
Loading…
Reference in New Issue
Block a user