From ab9052002c0b5ed78e880eb38127e0bf9cf645e3 Mon Sep 17 00:00:00 2001 From: Harry Date: Sat, 20 Sep 2025 11:56:19 +0100 Subject: [PATCH 1/3] Extract out the "Prompt" section from the commandline instructions into an include. This will allow us to re-use it earlier, in the installation instructions (where attendees are often confused about how the prompt works) --- en/intro_to_command_line/README.md | 33 ++---------------------------- en/intro_to_command_line/prompt.md | 32 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 en/intro_to_command_line/prompt.md diff --git a/en/intro_to_command_line/README.md b/en/intro_to_command_line/README.md index 805f640c9d7..49a9ca358ac 100644 --- a/en/intro_to_command_line/README.md +++ b/en/intro_to_command_line/README.md @@ -20,42 +20,13 @@ To start some experiments we need to open our command-line interface first. {% include "/intro_to_command_line/open_instructions.md" %} -## Prompt - You now should see a white or black window that is waiting for your commands. - - - -If you're on Mac or Linux, you probably see a `$`, like this: - -{% filename %}command-line{% endfilename %} -``` -$ -``` - - - - - -On Windows, you probably see a `>`, like this: - -{% filename %}command-line{% endfilename %} -``` -> -``` - -Take a look at the Linux section just above now -- you'll see something more like that when you get to PythonAnywhere later in the tutorial. - - - -Each command will be prepended by a `$` or `>` and one space, but you should not type it. Your computer will do it for you. :) +### The command-line Prompt -> Just a small note: in your case there may be something like `C:\Users\ola>` or `Olas-MacBook-Air:~ ola$` before the prompt sign, and this is 100% OK. +{% include "/intro_to_command_line/prompt.md" %} -The part up to and including the `$` or the `>` is called the *command line prompt*, or *prompt* for short. It prompts you to input something there. -In the tutorial, when we want you to type in a command, we will include the `$` or `>`, and occasionally more to the left. Ignore the left part and only type in the command, which starts after the prompt. ## Your first command (YAY!) diff --git a/en/intro_to_command_line/prompt.md b/en/intro_to_command_line/prompt.md new file mode 100644 index 00000000000..8c0c2ca7aac --- /dev/null +++ b/en/intro_to_command_line/prompt.md @@ -0,0 +1,32 @@ + + + +If you're on Mac or Linux, you probably see a `$`, like this: + +{% filename %}command-line{% endfilename %} +``` +$ +``` + + + + + +On Windows, you probably see a `>`, like this: + +{% filename %}command-line{% endfilename %} +``` +> +``` + +Take a look at the Linux section just above now -- you'll see something more like that when you get to PythonAnywhere later in the tutorial. + + + +Each command will be prepended by a `$` or `>` and one space, but you should not type it. Your computer will do it for you. :) + +> Just a small note: in your case there may be something like `C:\Users\ola>` or `Olas-MacBook-Air:~ ola$` before the prompt sign, and this is 100% OK. + +The part up to and including the `$` or the `>` is called the *command line prompt*, or *prompt* for short. It prompts you to input something there. + +In the tutorial, when we want you to type in a command, we will include the `$` or `>`, and occasionally more to the left. Ignore the left part and only type in the command, which starts after the prompt. From 2cf2dc05f6a2689a0d3de64af52fa5e24b047d67 Mon Sep 17 00:00:00 2001 From: Harry Date: Sat, 20 Sep 2025 11:57:22 +0100 Subject: [PATCH 2/3] Include commandline "prompt" section in main installation section Prevent people from being confused by the the prompt, and eg copy-pasting $s into the terminal. --- en/installation/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/en/installation/README.md b/en/installation/README.md index ee45a37ed9b..32d8b16c4ea 100644 --- a/en/installation/README.md +++ b/en/installation/README.md @@ -33,8 +33,17 @@ To install software on your machine, follow the instructions below: ## Brief intro to the command line {#intro-command-line} Many of the steps below reference the "console", "terminal", "command window", or "command line" -- these all mean the same thing: a window on your computer where you can enter commands. When you get to the main tutorial, you'll learn more about the command line. For now, the main thing you need to know is how to open a command window and what it looks like: + {% include "/intro_to_command_line/open_instructions.md" %} +### The Command-line Prompt + +Now you know how to open a command line, +we just need to understand what the "prompt" is. + +{% include "/intro_to_command_line/prompt.md" %} + + ## Install Python {#python} {% include "/python_installation/instructions.md" %} From 053d0a131ba5a64f051df02b91defcf5d29349c3 Mon Sep 17 00:00:00 2001 From: Harry Date: Sat, 20 Sep 2025 12:20:32 +0100 Subject: [PATCH 3/3] Update prompt section to reflect that zsh on mac now defaults to % --- en/intro_to_command_line/prompt.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/en/intro_to_command_line/prompt.md b/en/intro_to_command_line/prompt.md index 8c0c2ca7aac..6a4424e7185 100644 --- a/en/intro_to_command_line/prompt.md +++ b/en/intro_to_command_line/prompt.md @@ -1,31 +1,45 @@ - + + +On Windows, you probably see a `>`, like this: + +{% filename %}command-line{% endfilename %} +``` +> +``` + -If you're on Mac or Linux, you probably see a `$`, like this: + +If you're on Mac, you probably see a `%`, like this: {% filename %}command-line{% endfilename %} ``` -$ +% ``` - + -On Windows, you probably see a `>`, like this: +If you're on Linux, you probably see a `$`, like this: {% filename %}command-line{% endfilename %} ``` -> +$ ``` + Take a look at the Linux section just above now -- you'll see something more like that when you get to PythonAnywhere later in the tutorial. -Each command will be prepended by a `$` or `>` and one space, but you should not type it. Your computer will do it for you. :) +Each command will be prepended by a `$` or `>` or `%` and one space, but you should not type it. Your computer will do it for you. :) -> Just a small note: in your case there may be something like `C:\Users\ola>` or `Olas-MacBook-Air:~ ola$` before the prompt sign, and this is 100% OK. +> Just a small note: in your case there may be something like +> `C:\Users\ola>` +> or `Olas-MacBook-Air %` +> or `ola@mylaptop:$` +> before the prompt sign, and this is 100% OK. The part up to and including the `$` or the `>` is called the *command line prompt*, or *prompt* for short. It prompts you to input something there.