codebytere / codebytere/codebytere.github.io

`..` has weird semantics

Đang mở
#9 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
546
Fork
105
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

`..`, which should be "1 directory above `cwd`" seems to actually have different semantics. Moreover, few other issues.

To repro:
1. `cd projects`
2. `clear`
3. Run the commands in the screenshot

![image](https://user-images.githubusercontent.com/1797812/45268008-409f0180-b43c-11e8-8a01-fd0869fa1b86.png)

Issues:
1. After `clear`, it says I'm in `root/`, even though I'm actually still in `projects/`. The `ls` verifies I'm in `projects/` and then lists the files there
2. `ls ..` should list files in the parent directory, but actually lists files in the current directory (like `ls .`) which leads me to believe `..` has the same semantics of `.`
3. `cd ..` says "not a valid directory" even though, it should either (according to issue 2), not change directories and just stay in the current one without an error, or it should actually go to `root/` according to standard semantics for this

Known workaround:
Refresh 😂

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.