Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
18d21527
Unverified
Commit
18d21527
authored
Apr 26, 2022
by
James Yeoman
Committed by
Marc Cornellà
Sep 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(gcloud): support for official apt repo (#10889)
Fixes #10888 Closes #10889
parent
875a4553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
gcloud.plugin.zsh
plugins/gcloud/gcloud.plugin.zsh
+17
-3
No files found.
plugins/gcloud/gcloud.plugin.zsh
View file @
18d21527
...
...
@@ -10,7 +10,8 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
"/usr/share/google-cloud-sdk"
"/snap/google-cloud-sdk/current"
"/usr/lib64/google-cloud-sdk/"
"/usr/lib/google-cloud-sdk"
"/usr/lib64/google-cloud-sdk"
"/opt/google-cloud-sdk"
)
...
...
@@ -20,15 +21,28 @@ if [[ -z "${CLOUDSDK_HOME}" ]]; then
break
fi
done
unset
search_locations gcloud_sdk_location
fi
if
((
${
+CLOUDSDK_HOME
}
))
;
then
# Only source this if gcloud isn't already on the path
if
((
!
$+
commands[gcloud]
))
;
then
# Only source this if GCloud isn't already on the path
if
[[
-f
"
${
CLOUDSDK_HOME
}
/path.zsh.inc"
]]
;
then
source
"
${
CLOUDSDK_HOME
}
/path.zsh.inc"
fi
fi
source
"
${
CLOUDSDK_HOME
}
/completion.zsh.inc"
# Look for completion file in different paths
for
comp_file
(
"
${
CLOUDSDK_HOME
}
/completion.zsh.inc"
# default location
"/usr/share/google-cloud-sdk/completion.zsh.inc"
# apt-based location
)
;
do
if
[[
-f
"
${
comp_file
}
"
]]
;
then
source
"
${
comp_file
}
"
break
fi
done
unset
comp_file
export
CLOUDSDK_HOME
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment