Skip to content

Commit

Permalink
📝 Profile.Advice.json: Expand on $profile paths (#420)
Browse files Browse the repository at this point in the history
* Profile.Advice.json: Expand on $profile paths

- expand on $profile possibilities (different PSHosts)
- expand on changes IDEs make on $profile

* Profile.Advice.json: Addressing review

- fix typo profiles --> profile
- expand on default scope and PSHost of $profile in IDEs
  • Loading branch information
Maamue authored Oct 27, 2020
1 parent 378089f commit 953aa77
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion PSKoans/Data/Advice/Customization/Profile.Advice.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
"When starting powershell, there is a script it will automatically execute: the PowerShell profile script.",
"By default, it does not exist. It is stored in the location the variable $profile points to. By creating and adding code to it you can ensure that all your favorite aliases, variables, functions or whatnot will automatically be available each time!",
"To create or open the profile file, simply run:",
" notepad $profile"
" notepad $profile",
"\n",
"The $profile variable stores the path to the 'Current User, Current Host' profile, that points to a Microsoft.PowerShell_profile.ps1 file. Other profiles can be retreived from note properties of the $profile variable:",
"AllUsersAllHosts",
"AllUsersCurrentHost",
"CurrentUserAllHosts",
"CurrentUserCurrentHost",
"\n",
"Different PSHosts (applications hosting a powershell process) like IDEs have custom profile paths that are referenced by $profile. While the default $profile will be available in every environment, it is useful to know where IDEs save their profiles. Customizations only required for e.g. development can be added.",
"Powershell ISE uses $profile, but with a custom path pointing to a Microsoft.PowerShellISE_profile.ps1 file.",
"Visual Studio Code uses $profile, but with a custom path pointing to a Microsoft.VSCode_profile.ps1 file.",
"The $profile variable stores by default the path to the 'Current User, Current Host' profile even in IDEs."
]
}

0 comments on commit 953aa77

Please sign in to comment.