Skip to content

Numbers after colon in a name are ignored #1650

@sdomi

Description

@sdomi

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions