mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
6a9d3e2749
* add gcloud * use named capture group
9 lines
452 B
Fish
9 lines
452 B
Fish
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*(?<project>.*)' <$CLOUDSDK_CONFIG/configurations/config_$config \
|
|
&& _tide_print_item gcloud $tide_gcloud_icon' ' $project
|
|
end
|