-
-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
The documentation :
-Path <String>
The path to the file. If this is not provided, it will save regular expressions to the user's Irregular
module path.
1 - When I save a regex I can't tell where the cmdlet is saving the file.
2 - When the module is not installed by Install-module, in this case the behavior concerning the choice of the path is not documented.
Describe the solution you'd like
For 1 : add Verbose parameter.
For 2 : documente the behavior in this case.
Additional context
The Irregular module was not installed by Install-Module (no internet access on the server):
IPMO C: \ Users \ MyAccount \ Downloads \ irregular \ Irregular.psd1
$env:psmodulepath
C:\Users\MyAccount\Documents\WindowsPowerShell\Modules; C:\Program Files\WindowsPowerShell\Modules; C:\Windows\system32\WindowsPowerShell\v1.0\Modules ...In my case the file is saved in the first path present in $env:psmodulepath :
C:\Users\MyAccount\Documents\WindowsPowerShell\Modules\Irregular\Regex
Found with trace-Command :
Trace-Command PathResolution -expression {
$StartAnchor='\[1'
$EndAnchor ='P]]'
Write-RegEx -Name ExtractDataBetweenMarkers -After ${StartAnchor} -CharacterClass Any -Greedy -Lazy|
write-regex -Before $EndAnchor |Set-Regex } -pshost
#DÉBOGUER : PathResolution Information: 0 : RESOLVED PATH:
#C:\Users\MyAccount\Documents\WindowsPowerShell\Modules\Irregular\RegEx\ExtractDataBetweenMarkers.regex.txtThe cmdlet create the path '\Irregular\RegEx'
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request