mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
configdefault missed in refactoring
This commit is contained in:
committed by
Andrew Schwartzmeyer
parent
42c0b9a5f7
commit
f46aa8d195
@@ -180,7 +180,7 @@ namespace Microsoft.PowerShell
|
||||
else
|
||||
{
|
||||
//PSReadline does not have access to Utils.CorePSPlatform. Must set PSReadline path seperately
|
||||
string historypath = System.Environment.GetEnvironmentVariable("XDG_CACHE_HOME");
|
||||
string historypath = System.Environment.GetEnvironmentVariable("XDG_DATA_HOME");
|
||||
|
||||
if (!String.IsNullOrEmpty(historypath))
|
||||
{
|
||||
@@ -195,7 +195,8 @@ namespace Microsoft.PowerShell
|
||||
Environment.GetEnvironmentVariable("HOME"),
|
||||
".local",
|
||||
"share",
|
||||
"powershell",
|
||||
"powershell",
|
||||
"PSReadLine",
|
||||
hostName + "_history.txt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace System.Management.Automation
|
||||
string xdgdatahome = System.Environment.GetEnvironmentVariable("XDG_DATA_HOME");
|
||||
string xdgcachehome = System.Environment.GetEnvironmentVariable("XDG_CACHE_HOME");
|
||||
string xdgConfigHomeDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".config", "powershell");
|
||||
string xdgModuleDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".local", "share", "powershell", "modules");
|
||||
string xdgModuleDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".local", "share", "powershell", "Modules");
|
||||
string xdgCacheDefault = Path.Combine (System.Environment.GetEnvironmentVariable("HOME"), ".cache", "powershell");
|
||||
|
||||
switch (dirpath){
|
||||
@@ -141,11 +141,11 @@ namespace System.Management.Automation
|
||||
{
|
||||
Directory.CreateDirectory(xdgModuleDefault);
|
||||
}
|
||||
return xdgConfigHomeDefault;
|
||||
return xdgModuleDefault;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Path.Combine(xdgdatahome, "powershell");
|
||||
return Path.Combine(xdgdatahome, "powershell", "Modules");
|
||||
}
|
||||
|
||||
case Platform.XDG_Type.CACHE:
|
||||
@@ -160,6 +160,7 @@ namespace System.Management.Automation
|
||||
|
||||
return xdgCacheDefault;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return Path.Combine(xdgcachehome, "powershell");
|
||||
|
||||
Reference in New Issue
Block a user