8000 Remove A:...Z: drive functions on Linux / OS X · PowerShell/PowerShell@47a8ee5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47a8ee5

Browse files
committed
Remove A:...Z: drive functions on Linux / OS X
Resolves #612.
1 parent 7d9f439 commit 47a8ee5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/System.Management.Automation/engine/InitialSessionState.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5477,6 +5477,8 @@ internal static SessionStateAliasEntry[] BuiltInAliases
54775477
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("Get-Verb", GetGetVerbText()),
54785478
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("oss", GetOSTFunctionText()),
54795479

5480+
// Porting note: we remove the drive functions from Linux because they make no sense
5481+
#if !LINUX
54805482
// Default drives
54815483
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("A:", DefaultSetDriveFunctionText, SetDriveScriptBlock),
54825484
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("B:", DefaultSetDriveFunctionText, SetDriveScriptBlock),
@@ -5504,6 +5506,7 @@ internal static SessionStateAliasEntry[] BuiltInAliases
55045506
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("X:", DefaultSetDriveFunctionText, SetDriveScriptBlock),
55055507
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("Y:", DefaultSetDriveFunctionText, SetDriveScriptBlock),
55065508
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("Z:", DefaultSetDriveFunctionText, SetDriveScriptBlock),
5509+
#endif
55075510

55085511
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("cd..", "Set-Location .."),
55095512
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("cd\\", "Set-Location \\"),

0 commit comments

Comments
 (0)
0