Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: google-cloud-sdk fish completion instructions are wrong #30847

Closed
danielcompton opened this issue Mar 12, 2017 · 3 comments · Fixed by #32124
Closed

Bug report: google-cloud-sdk fish completion instructions are wrong #30847

danielcompton opened this issue Mar 12, 2017 · 3 comments · Fixed by #32124

Comments

@danielcompton
Copy link

Description of issue

I installed the Google Cloud SDK cask and followed the install instructions for fish completions:

set fish_user_paths /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin
set -x MANPATH /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/help/man /usr/local/share/man /usr/share/man /opt/x11/share/man

then tried running fish_update_completions.

I got:

$ fish_update_completions
No paths specified

After removing those two lines from my fish config file, I was able to run fish_update_completions and got this correct looking result:

$ fish_update_completions
Parsing man pages and writing completions to /Users/myuser/.local/share/fish/generated_completions/
  3176 / 3176 : zic.8

It looks like the instructions in #9958 aren't valid anymore possibly?

I'm pretty sure that MANPATH should be set something like this, although it should also account for MANPATH not existing beforehand: fish-shell/fish-shell#2090

set -x MANPATH /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/help/man $MANPATH

Currently there is no help directory or manpage subfolder at that location, so that won't work at the moment, and this causes the error No paths specified.

To summarise there are two problems here:

  1. There is no manpage folder at the location suggested.
  2. If there was, the MANPATH variable should be set in a way that respects the users existing MANPATH, and allows for MANPATH not previously existing.
@miccal miccal added the awaiting maintainer feedback Issue needs response from a maintainer. label Mar 13, 2017
@vitorgalvao
Copy link
Member

Ping @daenney.

@daenney
Copy link
Contributor

daenney commented Mar 26, 2017

Hmm, that's annoying.

So looking at my own installation of Google Cloud SDK from Cask I can indeed see that the help/man no longer exists:

[I] 14:10:51 ~/h/C/g/l/google-cloud-sdk (stable) $ pwd
/Users/daenney/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk

[I] 14:11:11 ~/h/C/g/l/google-cloud-sdk (stable) $ tree -d -L 2
.
├── bin
│   └── bootstrapping
├── lib
│   ├── googlecloudsdk
│   ├── surface
│   ├── third_party
│   └── tools
└── platform
    ├── bq
    ├── ext-runtime
    └── gsutil

11 directories

However, if I download one of the archives from https://cloud.google.com/sdk/downloads and extract it, they are there:

[I] 14:12:01 ~/D/google-cloud-sdk $ pwd
/Users/daenney/Downloads/google-cloud-sdk

[I] 14:12:02 ~/D/google-cloud-sdk $ tree -d -L 2
.
├── bin
│   └── bootstrapping
├── help
│   └── man
├── lib
│   ├── googlecloudsdk
│   ├── surface
│   ├── third_party
│   └── tools
└── platform
    ├── bq
    ├── ext-runtime
    └── gsutil

13 directories

So it seems that somehow these are getting lost when Cask is installing them, after that causing issues with the MANPATH. That said, Fish should ignore parts of the MANPATH that just don't exist so I'm confused as to why the fish_update_completions doesn't run at all. You're right though that the recommendations should state set -x MANPATH .... $MANPATH.

I'm not really a maintainer of this though, I just landed the patch last time to ensure Fish users could get correct completion since it wasn't working for me. I don't really know how to go about figuring out why the help/ directory seems to have decided to vanish.

@daenney
Copy link
Contributor

daenney commented Mar 26, 2017

Ah, the problem seem to stem from the following; the formula downloads the Cloud SDK from here: https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz, to always get the latest release.

However, that bundle, contrary to the versioned bundles at https://cloud.google.com/sdk/downloads doesn't contain the help/ directory. It might be worth adapting the formula to become version aware instead and then download the full release archive https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-148.0.1-darwin-x86_64.tar.gz. It might also be possible to generate the manpages from the other archive but I don't know how.

@miccal miccal removed the awaiting maintainer feedback Issue needs response from a maintainer. label Apr 9, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants