codebytere / codebytere/codebytere.github.io
`..` has weird semantics
- 主要語言
- JavaScript
- 星號
- 546
- 分支
- 105
- PR 合併指標
- 30 天內沒有已合併 PR
描述
`..`, 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

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 😂
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。