Closed younger-1 closed 4 years ago
exec
New-Item -Path $profile -ItemType "file" -Force
before Add-Content
exec
New-Item -Path $profile -ItemType "file" -Force
before Add-Content
Thanks.
@Moeologist please add the force commend to the homepage too.
@Cry0nicS Thank you for the advice.I will do it.
I would recommend instead of using $profile
use $profile.CurrentUserAllHosts
, this way it will be available not only in the Windows supplied console, but in ISE and any other PowerShell host (think vscode, etc..).
If you want it machine wide, and not just for the current user, use $profile.AllUserAllHosts
Thx, I will add this to README.
I would recommend instead of using
$profile
use$profile.CurrentUserAllHosts
, this way it will be available not only in the Windows supplied console, but in ISE and any other PowerShell host (think vscode, etc..). If you want it machine wide, and not just for the current user, use$profile.AllUserAllHosts
Using $profile
setting only, it can still work in powershell of VScode, cmder and winTerminal etc...
But not working in ISE. So I don't know what's more the setting you said above can do. Maybe I am misunderstanding...
All the things are right at first
For
enable completion in current shell
it worksbut it fails to
enable auto-load
I didn't find the path and the file in my computer,so I think it may be PowerShell' config, but I don't know why