Skip to content

(os error 123) with :cd to name containing quotes #5921

Open
@goyalyashpal

Description

@goyalyashpal

Summary

  • When the subdirectory (or a file too?) contianing a space is tab selected in helix's command line
  • only that subdirs name is enclosed in quotes (this is also standard behaviour in bash too)

i suspect that this (quotes in middle of name) is what causes the error
but since, those quotes were put by helix itself, this is bug.

This same error is raised when the name contain any naked spaces
but that is not a bug, that's a user error as that space is inserted by user.

Originally posted by @yashpalgoyal1304 in #5882 (comment)

Reproduction Steps

I tried this:

  1. hx
  2. try typing :cd C:\Prog <tab> <ret>
    i.e. execute command :cd C:\"Program Files"
    or essentially any root folder which contains subfolders with spaces in their names.

I expected this to happen:

Current working directory is now C:\Program Files

Instead, this happened:

Couldn't change the current working directory: The filename, directory name, or volume label syntax is incorrect. (os error 123)

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines
I did not file any helix directory under `%userprofile%/.cache`

Platform

Windows

Terminal Emulator

wezterm 20221119-145034-49b9839f

Helix Version

helix 22.12 (96ff64a)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bugO-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions