File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 45
45
AliasesToExport = ' *'
46
46
47
47
# Functions to export from this module
48
- FunctionsToExport = @ (' Invoke -With' , ' Write-WithPrompt' )
48
+ FunctionsToExport = @ (' Start -With' , ' Write-WithPrompt' )
49
49
50
50
# Private data to pass to the module specified in RootModule. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
51
51
PrivateData = @ {
Original file line number Diff line number Diff line change 1
- function Remove -With ()
1
+ function Erase -With ()
2
2
{
3
3
param (
4
4
[string ]
@@ -42,20 +42,23 @@ function Move-With()
42
42
elseif ($input_shell.StartsWith ($command )) {
43
43
44
44
Write-Host " Your primary command is '$command '." - ForegroundColor DarkRed
45
- Write-Host " When using with, make sure to not duplicate the command." - ForegroundColor DarkRed
45
+ Write-Host " Make sure to not duplicate the command." - ForegroundColor DarkRed
46
46
}
47
47
elseif ($input_shell.StartsWith (' >' ))
48
48
{
49
49
$addition = $input_shell.Substring (1 ).Trim()
50
+
50
51
if (! ($addition -eq ' ' ))
51
52
{
52
53
$command += " $ ( $input_shell.Substring (1 ).Trim()) "
53
54
}
54
55
}
56
+
55
57
elseif ($input_shell.StartsWith (' <' ))
56
58
{
57
- $command = Remove -With - command $command
59
+ $command = Erase - With - command $command
58
60
}
61
+
59
62
else
60
63
{
61
64
Invoke-Expression " $command $input_shell "
@@ -105,7 +108,7 @@ function Write-ClassicPrompt()
105
108
Write-Host " " - NoNewline
106
109
}
107
110
108
- function Invoke -With ()
111
+ function Start -With ()
109
112
{
110
113
$command = $args
111
114
if (Validate- Command - command $command [0 ])
@@ -127,5 +130,4 @@ function Validate-Command()
127
130
return [bool ](Get-Command - Name $command - ErrorAction SilentlyContinue)
128
131
}
129
132
130
- Set-Alias attach Invoke-With
131
-
133
+ Set-Alias attach Start-With
You can’t perform that action at this time.
0 commit comments