From 797e801e62608b1f30c4de21ce7b21153c56742d Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Mon, 19 May 2025 11:13:59 +0800 Subject: [PATCH 1/3] Add note on alternative bell character in course-definition.yml Include guidance for using '\u0007' as an alternative to '\a' for languages that do not support the latter in the shell completion section. --- course-definition.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/course-definition.yml b/course-definition.yml index a4cc28c..153ae74 100644 --- a/course-definition.yml +++ b/course-definition.yml @@ -1048,6 +1048,10 @@ stages: The tester will verify that your shell does not attempt completion on invalid commands, the bell is sent. The bell is sent by printing the `\a` character. + ### Notes: + + - If `\a` is not supported in the language you're using, you can use `\u0007` instead. + marketing_md: |- In this stage, you'll implement support for handling invalid commands gracefully. From 2a96c359a9faa22287107e8a04bc4921efd55d3e Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Mon, 19 May 2025 11:22:46 +0800 Subject: [PATCH 2/3] Refactor notes section in course-definition.yml for consistency Removed unnecessary line breaks in the notes sections for shell completion and bell character guidance to improve readability and maintain a uniform format. --- course-definition.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course-definition.yml b/course-definition.yml index 153ae74..dfbbbab 100644 --- a/course-definition.yml +++ b/course-definition.yml @@ -980,7 +980,7 @@ stages: The tester checks if the completion works as expected and if your shell outputs the correct output for `echo` and `exit` command. Note the space at the end of the completion. - ### Notes: + ### Notes - We recommend using a library like [readline](https://en.wikipedia.org/wiki/GNU_Readline) for your implementation. Most modern shells and REPLs (like the Python REPL) use readline under the hood. While you may need to override some of its default behaviors, it's typically less work than starting from scratch. - Different shells handle autocompletion differently. For consistency, we recommend using [Bash](https://www.gnu.org/software/bash/) for development and testing. @@ -1048,7 +1048,7 @@ stages: The tester will verify that your shell does not attempt completion on invalid commands, the bell is sent. The bell is sent by printing the `\a` character. - ### Notes: + ### Notes - If `\a` is not supported in the language you're using, you can use `\u0007` instead. From 615f14040c02a1377e5840ed07d96b4fbd58c847 Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Tue, 20 May 2025 14:09:00 +0800 Subject: [PATCH 3/3] Update bell character guidance in course-definition.yml Replaced the mention of '\a' with '\x07' for clarity and added a link to the bell character Wikipedia page for better understanding. This change enhances the accuracy of the instructions regarding handling invalid commands in the shell. --- course-definition.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/course-definition.yml b/course-definition.yml index dfbbbab..b05ba3d 100644 --- a/course-definition.yml +++ b/course-definition.yml @@ -1046,11 +1046,7 @@ stages: * The tester will first type `xyz` and then press ``. The tester expects that the prompt still shows "xyz" and there is a bell sound. The tester will verify that your shell does not attempt completion on invalid commands, the bell is sent. - The bell is sent by printing the `\a` character. - - ### Notes - - - If `\a` is not supported in the language you're using, you can use `\u0007` instead. + The bell is sent by printing `\x07`, the [bell character](https://en.wikipedia.org/wiki/Bell_character). marketing_md: |- In this stage, you'll implement support for handling invalid commands gracefully.