Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open files with square brackets in the name #391

Closed
mathstuf opened this issue Nov 1, 2014 · 21 comments
Closed

Cannot open files with square brackets in the name #391

mathstuf opened this issue Nov 1, 2014 · 21 comments
Assignees
Labels

Comments

@mathstuf
Copy link

mathstuf commented Nov 1, 2014

$subject.

@mathstuf
Copy link
Author

mathstuf commented Nov 1, 2014

Actually, it seems that other things break too with them (e.g., 'x' to close the parent). Seems related to the fact that Vim is escaping [ on tab completion of the file.

@briandonahue
Copy link

Seeing the same thing. Could this be new/recent behavior? I swear this used to work in an older version

@mathstuf
Copy link
Author

Could be a Vim bug as well.

@briandonahue
Copy link

Not sure how I would test that, but vim opens the files fine via e, tabe, and drag/drop...

@briandonahue
Copy link

Possibly related to #420 ?

@mathstuf
Copy link
Author

Possibly. ISTR it being escaped brackets as well. Ill have to check my install logs to see if Vim got bumped around this time. Did you update Vim lately?

@briandonahue
Copy link

I don't know what ISTR is... but yes, this may be a newer version of Vim than I had before, though I'm not sure offhand. It is a new machine, and I switched to vundle and updated my plugins. It says it's
7.4, MS-Windows 32-bit GUI version with OLE Support

@mathstuf
Copy link
Author

ISTR

"I seem to remember"

7.4

There should be a patch level with this (e.g., 7.4.475).

@briandonahue
Copy link

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov  3 2014 09:04:09)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-493
Compiled by [email protected]:http://SteveHallArchitecture.com

@justfalter
Copy link

I'm seeing this on 8.0, as well.

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 14 2016 03:42:03)
MacOS X (unix) version
Included patches: 1-3
Compiled by [email protected]

@justfalter
Copy link

From my testing, the problem seems to occur when a file or directory name contains a [, any number of characters, and ].

The following filenames are problematic for me:

test[foo].txt
test[[foo].txt
test[].txt

The following filenames open just fine:

test[foo.txt
testfoo].txt
test]foo[.txt

@przepompownia
Copy link
Contributor

Confirmed on [nerdtree].txt (NVIM 0.1.6-dev, Vim 8.0.22).

@ghost
Copy link

ghost commented Mar 22, 2017

I'm using Slackware 14.2 at the moment with the default package of gvim and i'm having the same issue. This concern directory opening as well. In case you wonder if it's a vim bug, it doesn't happen with the default file explorer. and it only affect files and directories with matching brackets. i.e. : this[file]name.whatever wont open but this[filename.whatever will.

@mathstuf
Copy link
Author

I think the filename is probably treated as a regex somewhere and not escaped properly. Other regex-special characters probably also cause issues in nerdtree.

@lifecrisis
Copy link
Contributor

Directly related to #680. This is a confirmed bug.

@MrMino
Copy link

MrMino commented Jun 30, 2017

+1, I suspect that this issue originetates from the fact that those names aren't escaped at some point, and they are interpreted as bash wildcards.

@lifecrisis
Copy link
Contributor

@MrMino, the problem was identified in #680.

@PhilRunninger PhilRunninger self-assigned this Aug 13, 2018
@PhilRunninger PhilRunninger added the PR Under Review Coding is finished, and a pull request has been created and is being reviewed. label Aug 13, 2018
@PhilRunninger
Copy link
Member

@mathstuf @briandonahue @justfalter @przepompownia @Nausx @MrMino , would you be willing to test the pull request #868 I've put together for this issue? Details are in the PR. Thanks.

@przepompownia
Copy link
Contributor

With #868 I can open [x].y and some other strangely named files. I hope it will pass other tests without regressions.

@briandonahue
Copy link

I am on holiday until 8/27, but will be happy to check it out after that if it still needs testing.

@PhilRunninger
Copy link
Member

Fixed in #868.

@PhilRunninger PhilRunninger removed the PR Under Review Coding is finished, and a pull request has been created and is being reviewed. label Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants