From b88d77fb2d0d5028a6f5670695dee6bec129501f Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Fri, 5 Apr 2024 11:57:45 -0400 Subject: ahhh sloppy fish, still needs fixing, esp with the vars --- home-config/fish/functions/_tide_item_gcloud.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 home-config/fish/functions/_tide_item_gcloud.fish (limited to 'home-config/fish/functions/_tide_item_gcloud.fish') diff --git a/home-config/fish/functions/_tide_item_gcloud.fish b/home-config/fish/functions/_tide_item_gcloud.fish new file mode 100644 index 0000000..609783a --- /dev/null +++ b/home-config/fish/functions/_tide_item_gcloud.fish @@ -0,0 +1,8 @@ +function _tide_item_gcloud + set -q CLOUDSDK_CONFIG || set -l CLOUDSDK_CONFIG ~/.config/gcloud + path is $CLOUDSDK_CONFIG/active_config && + read -l config <$CLOUDSDK_CONFIG/active_config && + path is $CLOUDSDK_CONFIG/configurations/config_$config && + string match -qr '^\s*project\s*=\s*(?.*)' <$CLOUDSDK_CONFIG/configurations/config_$config && + _tide_print_item gcloud $tide_gcloud_icon' ' $project +end -- cgit v1.2.3