You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have something that bothers me on the 'edge' cmdlet. I don't know if this is by design, but I noticed that the 'edge' cmdlet is case sensitive. I would rather have it be insensitive, and most of the things in PowerShell are case insensitive.
See the example below:
graph g {
SubGraph MyTests {
Record -Name "Parent" {
Row "Parent First Row"-Name "Parent_Row_First"
Row "Parent second Row"-Name "Parent_Row_Second"
}
$Childs=@("Pierre","Paul","Jacques")
Foreach($cin$Childs){
Record -Name $c {
Row "$c First Row"-Name "$($c)_Row_First"
Row "$c second Row"-Name "$($c)_Row_Second"
Row "$c thrid Row"-Name "$($c)_Row_third"
}
}
}
#This will not work, and create a new circle instead of the existing elements of the graph.#This is due to the fact that the case is different then in the $Childs array.
edge -From "parent"-To "pierre","paul","jacques"
} |Show-PSGraph
This is the result we would get (But not the one we would expect / want):
graph g {
SubGraph MyTests {
Record -Name "Parent" {
Row "Parent First Row"-Name "Parent_Row_First"
Row "Parent second Row"-Name "Parent_Row_Second"
}
$Childs=@("Pierre","Paul","Jacques")
Foreach($cin$Childs){
Record -Name $c {
Row "$c First Row"-Name "$($c)_Row_First"
Row "$c second Row"-Name "$($c)_Row_Second"
Row "$c thrid Row"-Name "$($c)_Row_third"
}
}
}
#This works, since it has the EXACT same case sensitivy a the strings located in '$Childs'
edge -From "Parent"-To "Pierre","Paul","Jacques"
} |Show-PSGraph
And in this case, this is what we would get (and actually expect).
Although the fix seems trivial, I needed quite some time to realize where it came from, as I was testing it on various scripts with Write-ClassDiagram on scripts that I didn't write. (See issue on PowershellClassUtils here)
I think it would be great if we could remove the case sensitivity, as I don't really see, as a PowerShell scripter, what it actually brings as added value.
The text was updated successfully, but these errors were encountered:
Stephanevg
changed the title
Edge cmdlet is case insensitive
Make Edge cmdlet case insensitive
Jun 28, 2018
Hi Kevin,
I have something that bothers me on the 'edge' cmdlet. I don't know if this is by design, but I noticed that the 'edge' cmdlet is case sensitive. I would rather have it be insensitive, and most of the things in PowerShell are case insensitive.
See the example below:
This is the result we would get (But not the one we would expect / want):
And in this case, this is what we would get (and actually expect).
Although the fix seems trivial, I needed quite some time to realize where it came from, as I was testing it on various scripts with Write-ClassDiagram on scripts that I didn't write. (See issue on PowershellClassUtils here)
I think it would be great if we could remove the case sensitivity, as I don't really see, as a PowerShell scripter, what it actually brings as added value.
The text was updated successfully, but these errors were encountered: