bash-my-gcp icon indicating copy to clipboard operation
bash-my-gcp copied to clipboard

Installing Bash-My-GCP in zsh

Open chronograph3r opened this issue 5 years ago • 8 comments
trafficstars

Hi, Please consider this a feature request or a How to do guide.

Please let us know how to use this for oh-my-Zsh,

chronograph3r avatar Feb 17 '20 06:02 chronograph3r

Thanks for raising this! zsh support is something that was already on my radar just not had the time to look in to it properly yet

i did a quick test with this just now and I noticed when I pulled this in to a default oh-my-zsh install the gcp command already taken by the git cherrypick alias provided by the built in git module so there may be some changes need to make that work right

mcrmonkey avatar Feb 17 '20 22:02 mcrmonkey

Looking forward to that 😄

chronograph3r avatar Feb 18 '20 05:02 chronograph3r

@mcrmonkey are you moving forward with this?

Rahulsharma0810 avatar Jun 08 '20 14:06 Rahulsharma0810

I've created a branch with the changes needed to get this running via oh-my-zsh

You'll need to pull the test branch in to your oh-my-zsh plugins directory and add it to your plugins list to use it:

cd ~/.oh-my-zsh/plugins
git clone -b bmg-zsh https://github.com/mcrmonkey/bash-my-gcp

Then add it to your plugin list in ~/.zshrc

Note: The git plugin has already claimed the gcp function name so gcp function isn't going to work for the moment if you're also loading the git plugin

mcrmonkey avatar Jun 29 '20 23:06 mcrmonkey

@chronograph3r, @Rahulsharma0810 If you have the time I'd appreciate any testing you can do with this

mcrmonkey avatar Jun 29 '20 23:06 mcrmonkey

wow this is great will try it rn, gcloud is crazy long

richtong avatar Aug 25 '22 13:08 richtong

OK, I don't know if this project is still alive, but I tried to use zinit with it and it failed, looks like the paths are not quite right for that installation. It works fine with a manual oh-my-zsh installation. https://github.com/zdharma-continuum/zinit

richtong avatar Aug 25 '22 14:08 richtong

You can try it yourself with these lines:

# to pick up the branch
zinit ice bpick"bmg-zsh"
zinit light mcrmonkey/bash-my-gcp

The error is in the loader.sh saying

Downloading mcrmonkey/bash-my-gcp…

Cloning into '/Users/rich/.zinit/plugins/mcrmonkey---bash-my-gcp'...
▃ ███████████ OBJ: 100, PACK: 139/139, COMPR: 100%, REC: 100%, RES: 100%
Note: Compiling: loader.sh… OK.
/Users/rich/.zinit/plugins/mcrmonkey---bash-my-gcp/loader.sh:4: no matches found: ./lib/*-functions

In looking at this I think the path is not quite right

richtong avatar Aug 25 '22 14:08 richtong