Skip to content

Instantly share code, notes, and snippets.

@anonhostpi
Last active January 8, 2024 08:38
Show Gist options
  • Save anonhostpi/c9117bc3e344898690624dbb804faa19 to your computer and use it in GitHub Desktop.
Save anonhostpi/c9117bc3e344898690624dbb804faa19 to your computer and use it in GitHub Desktop.
Simple edit profile in code
https://gist.github.com/anonhostpi/c9117bc3e344898690624dbb804faa19
function Edit-Profile {
param(
[Parameter(Position=0)]
[ValidateSet("CurrentUserCurrentHost", "CurrentUserAllHosts", "AllUsersCurrentHost", "AllUsersAllHosts")]
[string]$Type = "CurrentUserCurrentHost"
)
code ($Profile.$Type | Split-Path -Parent) $Profile.$Type
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment