Code Monkey home page Code Monkey logo

Comments (9)

stale avatar stale commented on September 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from prompt.

dmccaffery avatar dmccaffery commented on September 2, 2024

This is still an issue; keep it open mr stale bot!

from prompt.

stale avatar stale commented on September 2, 2024

Removing stale label due to activity.

from prompt.

sjk07 avatar sjk07 commented on September 2, 2024

Is there a simple way to deal with this? or is this on glcloud side?

from prompt.

dmccaffery avatar dmccaffery commented on September 2, 2024

its an easy fix; just hasn't been a high priority as everyone I know is using either bash or zsh (rather than a POSIX shell)

from prompt.

sjk07 avatar sjk07 commented on September 2, 2024

script is now called : install-gcloud in v8

Im a little lost on the direction to fix this then. What would be the potential fix here?

from prompt.

dmccaffery avatar dmccaffery commented on September 2, 2024

All scripts in src/sh/scripts should be posix compliant as we don't know what shell will be used on the distro for "sh" -- on Ubuntu, it is dash, but on macOS and many other distributions it is bash.

The install-gcloud script tests for the existence of the bash completion script and sources it, which will fail on posix shells.

To fix, we need to remove the completion check from install-gcloud entirely. This is a left over from when we only supported bash.

We're doing the completion magic today in the respective shell gcloud-path scripts anyway (to detect gcloud installs that weren't necessarily done by the prompt install-gcloud script):

if [ ! -f "$ZSH_COMPLETION_DIR/_gcloud-path" ]; then

and

if [ ! -f "$BASH_COMPLETION_DIR/_gcloud-path" ]; then

from prompt.

dmccaffery avatar dmccaffery commented on September 2, 2024

note: this has a side-effect of completion not being available until after the terminal is relaunched; but gcloud's own installer doesn't include completion by default (its always a manual-op), so I don't see an obvious downside to this. We could add a message in gcloud-install that tells the caller to restart their terminal to get completion.

Alternatively, we can duplicate the gcloud-install script in zsh/bash script-dirs with the appropriate sourcing.

Or, we could do some shell detection in the install-gcloud script and source the right one; but that's more complicated than its worth, IMHO.

Lastly, we could run the $AM_PROMPT_SHELL/eval/set-gcloud-path script from the gcloud-install script (if it exists), which simplifies detection -- I think $AM_PROMPT_SHELL is always available regardless of what shell is used to invoke.

from prompt.

github-actions avatar github-actions commented on September 2, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

from prompt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.