mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Changes to xdg to append powershell path
This commit is contained in:
committed by
Andrew Schwartzmeyer
parent
29e97bf1aa
commit
237c659b5e
@@ -181,29 +181,27 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
//PSReadline does not have access to Utils.CorePSPlatform. Must set PSReadline path seperately
|
||||
string modulepath = System.Environment.GetEnvironmentVariable("XDG_CACHE_HOME");
|
||||
|
||||
if (String.IsNullOrEmpty(modulepath))
|
||||
{
|
||||
modulepath = System.IO.Path.Combine(
|
||||
Environment.GetEnvironmentVariable("HOME"),
|
||||
".config/powershell/modules");
|
||||
|
||||
HistorySavePath = System.IO.Path.Combine(
|
||||
Environment.GetEnvironmentVariable("HOME"),
|
||||
modulepath,
|
||||
"PSReadLine",
|
||||
hostName + "_history.txt");
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
if (!String.IsNullOrEmpty(modulepath))
|
||||
{
|
||||
modulepath = System.IO.Path.Combine(modulepath, "powershell");
|
||||
HistorySavePath = modulepath;
|
||||
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
modulepath = System.IO.Path.Combine(
|
||||
Environment.GetEnvironmentVariable("HOME"),
|
||||
".config/powershell/modules");
|
||||
|
||||
HistorySavePath = System.IO.Path.Combine(
|
||||
Environment.GetEnvironmentVariable("HOME"),
|
||||
modulepath,
|
||||
"PSReadLine",
|
||||
hostName + "_history.txt");
|
||||
}
|
||||
#else
|
||||
}
|
||||
#else
|
||||
HistorySavePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||
+ @"\Microsoft\Windows\PowerShell\PSReadline\" + hostName + "_history.txt";
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user