refactor: replace "folder" with "directory" across file handling components and tests

This commit is contained in:
Justin Lin committed 2025-04-24 21:24:55 +08:00
1 parent 7e50c8e06c
commit cdd22634e0
18 files changed
+150 -104

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
echo start
echo hello
echo next
echo finish
+71
View File
@@ -0,0 +1,71 @@
id: get-started
image: base
title: 終端機的基本知識
instruction: |
歡迎來到 Linux Odyssey!
在這個關卡中,你將會學到:
1. 如何使用這個網站
2. 如何使用終端機
stages:
- id: start
name: 按下 `開始` 按鈕開始
condition:
command: ^echo start$
response:
content: |
在畫面的中下方的區塊是終端機,你可以在終端機裡輸入指令來操作電腦。
在終端機中,你所看到的 `commander:~ $` 叫做命令提示字串。
命令提示字串最後的錢字號 `$` 叫命令提示符,你必須將指令輸入在它的後方。
當你輸入完指令並按下 Enter 之後,終端機會執行你輸入的指令,並且會從終端機的下一行開始輸出指令的執行結果。
直到你看到新的 `commander:~ $` 出現時,代表你可以輸入下一個指令了。
現在請你輸入 `echo hello` 來看看會發生什麼事。
hint: |
在 `commander:~ $` 後面輸入 `echo hello` 並按下 Enter
- id: echo-hello
name: 在終端機輸入 `echo hello`
requirements:
- start
condition:
command: ^echo hello$
response:
content: |
你應該可以看到終端機上顯示了以下內容:
```
commander:~ $ echo hello
hello
```
第一行的 `commander:~ $` 是命令提示字串,接在後方的 `echo hello` 是你輸入的指令。
第二行的 `hello` 則是終端機的輸出結果。
你現在知道了如何在終端機上輸入指令,以及查看終端機輸出的位置。
現在請輸入 `echo next` 來繼續下一個步驟。
hint: |
輸入 `echo next` 繼續下一個步驟
- id: echo-next
name: 在終端機輸入 `echo next`
requirements:
- echo-hello
condition:
command: ^echo next$
response:
content: |
`Ctrl + C` 在終端機中是一個很重要的快捷鍵,它可以用來中斷正在執行的指令,並產生一個新的命令提示字串,讓你可以繼續輸入指令。
如果指令執行很久沒有反應,或你因為其他原因想要中斷指令,你可以按下 `Ctrl + C` 來中斷指令。
又或者你輸入了錯誤的指令,卻懶得慢慢刪除,你也可以按下 `Ctrl + C` 來產生新的命令提示字串重新輸入指令。
如果你已經理解了剛才的說明,請輸入 `echo finish` 來結束這一關。
hint: |
按下 `Ctrl + C` 能夠中斷正在執行的指令
按下 `Ctrl + C` 能夠產生新的命令提示字串
輸入 `echo finish` 來結束這一關
- id: END
name: 結束關卡
requirements:
- echo-next
condition:
command: ^echo finish$
response:
content: |
恭喜你,你已經完成了這個關卡!