This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "version": 3, | |
| "blocks": [ | |
| { | |
| "type": "prompt", | |
| "alignment": "left", | |
| "segments": [ | |
| { | |
| "type": "session", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| // chat.tools.terminal.autoApprove controls which command lines are auto-approved. | |
| // General rule: EVERYTHING requires approval unless explicitly allowed below. | |
| // The structure is: | |
| // 1) "Dangerous / mutating / high-impact" rules that REQUIRE approval. | |
| // 2) (blank line) | |
| // 3) Safe, read-only, or scoped commands that are AUTO-APPROVED. | |
| // | |
| // IMPORTANT: Remove all comments before pasting this into VS Code settings JSON. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $resourceTypesAndKinds = @{} | |
| $PSStyle.Progress.MaxWidth = 150 | |
| $subscriptions = Get-AzSubscription | Where-Object { $_.State -ne 'Disabled' } | Sort-Object Name; foreach ($subscription in $subscriptions) { | |
| Set-AzContext -Subscription $subscription.Id | |
| $resourceProviders = Get-AzResourceProvider | Sort-Object ProviderNamespace; foreach ($provider in $resourceProviders) { | |
| $providerNamespace = $provider.ProviderNamespace | |
| foreach ($resourceType in $provider.ResourceTypes | Sort-Object ResourceTypeName) { | |
| $resourceTypeName = $resourceType.ResourceTypeName | |
| $concatenatedString = "$providerNamespace/$resourceTypeName" | |
| $resourceTypesAndKinds[$concatenatedString] = $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Slightly modified version of the code posted in https://stackoverflow.com/a/64236441/7422811 | |
| // License: Attribution-ShareAlike 2.5 Generic (CC BY-SA 2.5), https://creativecommons.org/licenses/by-sa/2.5/ | |
| using System.Text; | |
| /// <summary> | |
| /// Helper functions to parse a command line string into a command line argument array in | |
| /// the same way as .NET does. Tested with .NET 6 on Windows and Ubuntu Linux. | |
| /// </summary> | |
| internal static class CommandLine |