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

Numbers after colon in a name are ignored #1650

Closed
sdomi opened this issue May 14, 2020 · 1 comment
Closed

Numbers after colon in a name are ignored #1650

sdomi opened this issue May 14, 2020 · 1 comment

Comments

@sdomi
Copy link

sdomi commented May 14, 2020

Description of the problem or steps to reproduce

Let's assume a file named asdf:1234. This is a valid filename on Linux (or, at least, if you're using ext/xfs/zfs/...), but micro fails to open it properly - micro asdf\:1234 opens file asdf, same with using quotes, or even without escaping the colon at all.

micro asdf: -> asdf:
micro asdf:: -> asdf::
micro asdf:1234 -> asdf
micro asdf::1234 -> asdf:
micro asdf\ :\ 1234 -> asdf : 1234 (good!)
micro asdf\ :1234 -> asdf
micro asdf\ :1234.txt -> asdf

It appears that the problem only occurs when a filename contains numbers right after the colon. The issue doesn't occur with any other special characters.

Specifications

Commit hash: Unknown, Version 2.0.3 from Void's repo
OS: Void Linux
Terminal: sakura (bash)

@zyedidia
Copy link
Owner

This is because the syntax file.txt:line is used for opening a file at a specific line number. I'll have to think about the best way to support an escape syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants