mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Make 'cd' go to the HOME directory
This commit is contained in:
1 parent
aa72512c76
commit
06252836ea
2 files changed
+39
-18
No files matched your search
@@ -996,6 +996,12 @@ namespace Microsoft.PowerShell.Commands
|
||||
try
|
||||
{
|
||||
// Change the current working directory
|
||||
if (string.IsNullOrEmpty(Path))
|
||||
{
|
||||
// If user just typed 'cd', go to FileSystem provider home directory
|
||||
Path = SessionState.Internal.GetSingleProvider(Commands.FileSystemProvider.ProviderName).Home;
|
||||
}
|
||||
|
||||
result = SessionState.Path.SetLocation(Path, CmdletProviderContext);
|
||||
}
|
||||
catch (PSNotSupportedException notSupported)
|
||||
|
||||
Reference in new issue
Block a user