Problematic Characters in Path? #54

Closed
baskerville opened this Issue Jul 3, 2012 · 6 comments

2 participants

@baskerville

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]/
@rupa
Owner

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

@baskerville

I didn't type any bracket characters, just:

z Foo
@rupa
Owner

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
~/Foo.-.[12-3-4567]$
@baskerville

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]/
@rupa
Owner

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)?

@baskerville

Arch Linux, gawk 4.0.1.

@rupa rupa added a commit that closed this issue Jul 4, 2012
@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
9162239
@rupa rupa closed this in 9162239 Jul 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment