Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Problematic Characters in Path? #54

baskerville opened this Issue · 6 comments

2 participants


It seems like brackets in file names with lead to tricky situations:

awk: cmd. line:32: (FILENAME=- FNR=67) fatal: Invalid range end: //home/foo/bar/Foo.-.[12-3-4567]/

Just tested it out, completion seems to work OK, to use brackets in search patterns looks like you have to double escape them eg z \\[12-3


I didn't type any bracket characters, just:

z Foo

Hmm, I can't reproduce that. Am I doing anything different than you?

~$ mkdir Foo.-.\[12-3-4567\]
~$ cd Foo.-.[12-3-4567]
~/Foo.-.[12-3-4567]$ cd
~$ z Foo

If I do the same thing, I get the aforementioned error after the last command:

awk: cmd. line:32: (FILENAME=- FNR=73) fatal: Invalid range end: //home/me/Foo.-.[12-3-4567]/

Huh, what OS are you using. If it's a *nix, what awk is installed (on the Ubuntu machine I'm on at the moment it's mawk)?


Arch Linux, gawk 4.0.1.

@rupa rupa closed this issue from a commit
@rupa fix for gawk with regex chars in paths
Sub out regex chars in paths before comparing them. Fixes gawk and
doesn't seem to break other awks. Closes #54
@rupa rupa closed this in 9162239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.