{"action":"created","issue":{"url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/issues/38","repository_url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle","labels_url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/issues/38/comments","events_url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/issues/38/events","html_url":"https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/38","id":91033137,"number":38,"title":"Profile scripting best practices","user":{"login":"rkeithhill","id":5177512,"avatar_url":"https://avatars.githubusercontent.com/u/5177512?v=3","gravatar_id":"","url":"https://api.github.com/users/rkeithhill","html_url":"https://github.com/rkeithhill","followers_url":"https://api.github.com/users/rkeithhill/followers","following_url":"https://api.github.com/users/rkeithhill/following{/other_user}","gists_url":"https://api.github.com/users/rkeithhill/gists{/gist_id}","starred_url":"https://api.github.com/users/rkeithhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkeithhill/subscriptions","organizations_url":"https://api.github.com/users/rkeithhill/orgs","repos_url":"https://api.github.com/users/rkeithhill/repos","events_url":"https://api.github.com/users/rkeithhill/events{/privacy}","received_events_url":"https://api.github.com/users/rkeithhill/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/labels/Best%20Practices","name":"Best Practices","color":"006b75"},{"url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/labels/Discussion","name":"Discussion","color":"0e8a16"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-06-25T17:55:28Z","updated_at":"2016-07-14T19:58:44Z","closed_at":null,"body":"I'm not sure where this belongs or if it even belongs in this repo but...  Most of us probably have pretty complex profile scripts.  My PSReadline custom configuration alone is over 200 lines.  So I've taken to moving those \"module-specific\" configurations out into a separate file that sits by my profile.ps1 file.  It is called \"PSReadline_config.ps1\" - I've seen this approach with Bash (.bash_aliases).  I was thinking something like `<ModuleOrDescription>_config.ps1`.  Then in your profile script you just dot source it in like so:\r\n\r\n```powershell\r\n. $PSScriptRoot\\PSReadline_config.ps1\r\n```\r\n\r\nThis has made it easier for me to share my PSReadline config with others.\r\n\r\nBTW there is probably some best practices around \"which\" profile scripts to use.  I'm old school and use the current user all hosts script and for PSReadline I check against the host name.  I should probably use the console's profile `Microsoft.PowerShell_profile.ps` and ditch the `if ($host.Name -eq 'ConsoleHost')` check."},"comment":{"url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/issues/comments/232774801","html_url":"https://github.com/PoshCode/PowerShellPracticeAndStyle/issues/38#issuecomment-232774801","issue_url":"https://api.github.com/repos/PoshCode/PowerShellPracticeAndStyle/issues/38","id":232774801,"user":{"login":"Jaykul","id":192942,"avatar_url":"https://avatars.githubusercontent.com/u/192942?v=3","gravatar_id":"","url":"https://api.github.com/users/Jaykul","html_url":"https://github.com/Jaykul","followers_url":"https://api.github.com/users/Jaykul/followers","following_url":"https://api.github.com/users/Jaykul/following{/other_user}","gists_url":"https://api.github.com/users/Jaykul/gists{/gist_id}","starred_url":"https://api.github.com/users/Jaykul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jaykul/subscriptions","organizations_url":"https://api.github.com/users/Jaykul/orgs","repos_url":"https://api.github.com/users/Jaykul/repos","events_url":"https://api.github.com/users/Jaykul/events{/privacy}","received_events_url":"https://api.github.com/users/Jaykul/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T19:58:44Z","updated_at":"2016-07-14T19:58:44Z","body":"I can't think where to put this, but it's worth discussing ... and documenting."}}
{"actor":{"display_login":"Jaykul"}}