Revert use of ":" for options on Windows, use "-" but replace "-p" with "-pw" to avoid ambiguity, interpret no options as "password"

This commit is contained in:
2024-03-17 17:32:13 -04:00
parent ff9092bc9f
commit dd0d1ffe55
6 changed files with 83 additions and 85 deletions
+4 -7
View File
@@ -36,14 +36,11 @@ function mutn {
[ArgumentCompletions('add', 'gen', 'edit', 'copy', 'shear')]
[string]$argument,
[Parameter(Position = 2)]
[Parameter(Position = 2, ValueFromRemainingArguments=$true)]
[ArgumentCompleter({ MUTNOptionCompleter @args })]
[string]$option,
[Parameter(Position = 3)]
[string]$potentialShowFlag
[string]$option
)
#Invoke-Expression -Command ('/usr/local/bin/mutn ' + ($entry -replace ' ', '` '), $argument, ($option -replace ':', '-'), ($potentialShowFlag -replace ':', '-')).Trim() # UNIX testing
Invoke-Expression -Command ('./mutn.exe ' + ($entry -replace ' ', '` '), $argument, $option, $potentialShowFlag).Trim()
#Invoke-Expression -Command ('/usr/local/bin/mutn ' + ($entry -replace ' ', '` '), $argument, $option).Trim() # UNIX testing
Invoke-Expression -Command ('./mutn.exe ' + ($entry -replace ' ', '` '), $argument, $option).Trim()
}