When I try to enter square brackets inside gfsh they do not always show on screen and if they are followed by digits the first two are not considered.
If I for example enter connect --locator=somehost[12345] this is shown:

It seems to help when I hit [ twice because then one [ makes it to the screen. But it remains impossible to get the closing square bracket ].
Please note that I use a German setting and thus have to press AltGr + 8 for the opening square bracket [ and AltGr + 9 for the closing square bracket ].
Other characters work, for example { and } which I also have to enter using AltGr + 7. The backslash \ that I have to enter by pressing AltGr + ß doesn't work too.
I posted this problem also on the Geode Jira.
As a workaround it works to enter those special characters using their Ascii value.
On Windows this is:
[\]Please note that you have to use the numerical keyboard for this.