"move file" level

This commit is contained in:
blinry 2020-11-13 11:36:05 +01:00
parent f742085fd1
commit adfc753096
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,28 @@
title = No sleep required
cards = checkout commit-auto reset-hard file-new file-delete file-rename
[description]
Our client just let us know they don't need sleep! Huh.
Because of that, they won't require a bed, and have asked you to build some other piece of furniture from the wood.
Can you rename the object into something else, give it a new description, and make a commit from that?
[setup]
echo A yellow cupboard with lots of drawers. > cupboard
echo A really big yellow shelf. > shelf
echo A comfortable, yellow bed with yellow cushions. > bed
git add .
git commit -m "Initial furniture"
[win]
NUM_FILES="$(git ls-tree --name-only -r HEAD | wc -l)"
NUM_BEDS="$(git ls-tree --name-only -r HEAD | grep '^bed$' | wc -l)"
test "$NUM_BEDS" = 0 && test "$NUM_FILES" -ge 3
[congrats]
Neat! It even still looks a bit comfortable!

View file

@ -103,5 +103,10 @@
"id": "file-delete", "id": "file-delete",
"command": "rm [file]", "command": "rm [file]",
"description": "Delete a new file." "description": "Delete a new file."
},
{
"id": "file-rename",
"command": "mv [file] [string]",
"description": "Rename a new file."
} }
] ]