Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
e906a313
Unverified
Commit
e906a313
authored
Apr 08, 2023
by
Carlo Sala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(azure): look properly for azure config file
Closes #11606
parent
9b1ef262
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
azure.plugin.zsh
plugins/azure/azure.plugin.zsh
+2
-2
No files found.
plugins/azure/azure.plugin.zsh
View file @
e906a313
...
@@ -18,10 +18,10 @@ compctl -K _az_subscriptions azss
...
@@ -18,10 +18,10 @@ compctl -K _az_subscriptions azss
# Azure prompt
# Azure prompt
function
azure_prompt_info
()
{
function
azure_prompt_info
()
{
[[
!
-f
"
${
AZURE_CONFIG_DIR
:-
$HOME
/.azure
/azureProfile.json
}
"
]]
&&
return
[[
!
-f
"
${
AZURE_CONFIG_DIR
:-
$HOME
/.azure
}
/azureProfile.json
"
]]
&&
return
# azgs is too expensive, if we have jq, we enable the prompt
# azgs is too expensive, if we have jq, we enable the prompt
((
$+
commands[jq]
))
||
return
1
((
$+
commands[jq]
))
||
return
1
azgs
=
$(
jq
-r
'.subscriptions[] | select(.isDefault==true) .name'
${
AZURE_CONFIG_DIR
:-
$HOME
/.azure/azureProfile.json
}
)
azgs
=
$(
jq
-r
'.subscriptions[] | select(.isDefault==true) .name'
"
${
AZURE_CONFIG_DIR
:-
$HOME
/.azure
}
/azureProfile.json"
)
echo
"
${
ZSH_THEME_AZURE_PREFIX
:
=<az
:
}${
azgs
}${
ZSH_THEME_AZURE_SUFFIX
:
=>
}
"
echo
"
${
ZSH_THEME_AZURE_PREFIX
:
=<az
:
}${
azgs
}${
ZSH_THEME_AZURE_SUFFIX
:
=>
}
"
}
}
...
...
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