NameIT icon indicating copy to clipboard operation
NameIT copied to clipboard

`Invoke-Generate -CustomData` - `alias:\` Called Instead of `function:\`

Open mattcargile opened this issue 2 years ago • 0 comments

Usage like ig -CustomData @{ pwd = 'a', 'B' } '[pwd]' returns the present working directory because there is an Alias with this name already. Maybe one could use execution like &( get-item function:\pwd) instead to insure we execute the function?

Below is the creation of the function.

https://github.com/dfinke/NameIT/blob/77f80de874adc658ae767cae64a56ef085792afa/Public/Invoke-Generate.ps1#L122

Maybe below is where we could change to use the get-item call reference?

https://github.com/dfinke/NameIT/blob/77f80de874adc658ae767cae64a56ef085792afa/Public/Invoke-Generate.ps1#L150

mattcargile avatar Jan 13 '23 03:01 mattcargile