ls: preserves backslashes in output even when glob pattern uses forward slashes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- rust
- Lĩnh vực
- cli, operating-systems
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với lệnh Windows ls và glob c:/Windows/*.exe bằng môi trường uutils coreutils 0.8.0 đã được báo cáo. Theo dõi cách các đường dẫn Windows được glob định dạng sau khi khớp. Hoàn thành khi các đường dẫn đầu ra giữ nguyên kiểu dấu gạch chéo từ mẫu đầu vào và có coverage cho ví dụ đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When running ls with a glob pattern that uses forward slashes (for example, c:/Windows/*.exe), the output paths are normalized to backslashes instead of preserving the separator style used in the input pattern.
This makes the output inconsistent with the command that was typed, and it can break scripts or tools that parse ls output and expect the path format to remain stable.
Steps to Reproduce
C:\Windows> ls c:/Windows/*.exe
Actual Output
'c:/Windows\HelpPane.exe'
'c:/Windows\bfsvc.exe'
'c:/Windows\notepad.exe'
'c:/Windows\write.exe'
...
Expected Output
'c:/Windows/HelpPane.exe'
'c:/Windows/bfsvc.exe'
'c:/Windows/notepad.exe'
'c:/Windows/write.exe'
...
Why This Matters
The output should be consistent with the path style used in the input glob pattern. When ls output is used for programmatic parsing, the unexpected separator conversion can cause parsing failures or make downstream processing more difficult.
Environment
- OS: Windows
- Shell: Command Prompt (cmd.exe)
- coreutils version: ls (uutils coreutils) 0.8.0
Comparison with WSL
For reference, ls under WSL does not show this issue in the same way:
user@pc:/mnt/c/Users/USER$ ls /mnt/c/Windows/*.exe
/mnt/c/Windows/HelpPane.exe /mnt/c/Windows/explorer.exe /mnt/c/Windows/notepad.exe /mnt/c/Windows/splwow64.exe
/mnt/c/Windows/bfsvc.exe /mnt/c/Windows/hh.exe /mnt/c/Windows/regedit.exe /mnt/c/Windows/winhlp32.exe
This makes the Windows build look inconsistent compared with the WSL behavior for the same kind of globbed output.
Additional Note
I could not find an existing issue for this specific behavior.
- Ngôn ngữ chính
- Rust
- Star
- 5.2k
- Fork
- 108
- Merge trung bình
- 4 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/coreutils
-
Add support for /dev/nullĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
-
sleep has 9MBĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của microsoft/coreutils
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
swc-project/swc#12516 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mls-rs-crypto-awslc: exact aws-lc-rs =1.16.3 pin blocks rustls security updateCó thể đã có người làm @muscariello đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
[work-item] adam-adae-worsening-emergence: conform spec.yaml to the specification style contract (REQ-1280)Có thể đã có người làm @muse-yamaa-bot đã nhận hôm nay. Đang mởwork-item
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]:设置的关于页面,“系统信息”部分排版异常Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
metasequoiaime/msime#7328 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-opensovd/classic-diagnostic-adapter#616 ·
Maintainer thường phản hồi trong vòng 2 ngày