cli hints in readme

This commit is contained in:
bleeptrack 2021-03-01 11:12:58 +01:00 committed by GitHub
parent 45742eef3a
commit 79932e0f59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
# Oh My Git! # Oh My Git!
<img src="https://github.com/git-learning-game/oh-my-git/blob/main/images/oh-my-git.png" width="400">
**Oh My Git!** is an open-source game about learning Git! **Oh My Git!** is an open-source game about learning Git!
@ -35,6 +36,12 @@ This text will be shown when the level starts.
It describes the task or puzzle the player can solve. It describes the task or puzzle the player can solve.
[cli]
(optional) This text will be shown below the level description in a darker color.
It should give hints to the player about command line usage and also maybe some neat tricks.
[congrats] [congrats]
This text will be shown after the player has solved the level. This text will be shown after the player has solved the level.
@ -56,7 +63,8 @@ git commit -m "Initial commit"
# writing the body of a Bash function. Make the function return 0 if it's # writing the body of a Bash function. Make the function return 0 if it's
# solved, and a non-zero value otherwise. You can use `return`, and also, Bash # solved, and a non-zero value otherwise. You can use `return`, and also, Bash
# functions return the exit code of the last statement, which sometimes allows # functions return the exit code of the last statement, which sometimes allows
# very succinct checks. # very succinct checks. The comment above the win check will be shown in the game
# as win condition text.
# Check whether the file has at least two lines in the latest commit: # Check whether the file has at least two lines in the latest commit:
test "$(git show HEAD:people_who_are_awesome | wc -l)" -ge 2 test "$(git show HEAD:people_who_are_awesome | wc -l)" -ge 2