mbhynes / fzf-gcloud Goto Github PK
View Code? Open in Web Editor NEWPreview the gcloud api with fzf.
License: GNU General Public License v3.0
Preview the gcloud api with fzf.
License: GNU General Public License v3.0
When running the cache build everything failed because the docs folder wasn't found.
I needed to update the bin_path to.
gcloud_bin_path="/usr/lib64/google-cloud-sdk"
the bin path in __gcloud_sel was fine as is, however.
I couldn't set up the SQLite cache and kept getting Could not find a valid gcloud docs folder at: '/usr/bin/gcloud'.
error. Looking a little bit I've found that the variable gcloud_docs_root
has been set to the wrong path. Google must have updated the path to /usr/lib/google-cloud-sdk/lib/surface
recently, so hard setting it to this path did the trick.
As you probably know, CTRL, P is a "known" keybinding in the shell (brings up the previous command).
I think it's better to default to another keybinding. A keybinding that comes to my mind is CTRL, G (G
for gcloud
)
I created a PR to change it to CTRL, G instead; let me know what you think
you need to install the fzf key bindings and fuzzy completions, as well as basic fzf or the __fzfcmd isnt installed.
$(brew --prefix)/opt/fzf/install
Hi,
I've installed the script, but it seems to have issues when building the cache:
mktemp: too few X's in template ‘.fzf-gcloud-cmd_cache.db’
Rebuilding gcloud command cache in '/home/farzad/.fzf-gcloud-cmd_cache.db'
Adding invocation for 'gcloud alpha transfer' (build from /opt/google-cloud-sdk/lib/surface/transfer/__init__.py)
Error: no such table: GCLOUD_CMD_CACHE
Adding invocation for 'gcloud transfer operations monitor' (build from /opt/google-cloud-sdk/lib/surface/transfer/operations/monitor.py)
Error: no such table: GCLOUD_CMD_CACHE
...
And the error appears for every single line saying Adding invocation ...
There are gcloud
commands defined in YAML files (not *.py) that do not show up in the autocompletion list.
Example files related to the gcloud
api for bq
that do not appear in the completion:
find $GCLOUD_PATH/lib/surface/bq/tables
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/delete.yaml
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/__init__.py
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/copy.py
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/__pycache__
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/__pycache__/__init__.cpython-39.pyc
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/__pycache__/copy.cpython-39.pyc
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/show_rows.yaml
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/describe.yaml
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/list.yaml
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/create.yaml
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/insert.yaml
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/bq/tables/update.yaml
when I just do ctrl-k and nothing else I get this error:
Error: no such table: GCLOUD_CMD_CACHE.
I tried it again in a new window and still got it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.