-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #483 from Czechitas-podklady-WEB/feature/prikazova…
…-radka Feature/prikazova radka
- Loading branch information
Showing
12 changed files
with
113 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Cvičení: Příkazová řádka | ||
|
||
::exc[cvlekce/chat] | ||
::exc[cvlekce/textovka] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Chat | ||
demand: 2 | ||
--- | ||
|
||
Napište ostatním zprávu do společného chatu a přečtěte si zprávy od ostatních. | ||
|
||
1. Otevřete příkazovou řádku. | ||
1. Příkazem `whoami` zjistěte, jak jste přihlášení. | ||
1. Pomocí `npx @czechitas/chat send "Nějaká zpráva"` odešlete zprávu do společného chatu. | ||
1. Pomocí `npx @czechitas/chat list` si zobrazte všechny zprávy v chatu a zkontrolujte, že je tam i ta vaše. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## Složitější příkazy | ||
|
||
Program `whoami` byl velmi prostý. Vypsal nám jen název přihlášeného uživatele. Složitější příkazy mohou mít i parametry, které jim podrobněji říkají, co mají dělat. Parametry se zadávají za jménem příkazu a oddělují se od něj mezerou. | ||
|
||
Víceslovné parametry je potřeba obalit do uvozovek, aby bylo jasné, že patří k sobě. | ||
|
||
```sh | ||
nazev-prikazu první druhý třetí 100 "delší text" | ||
``` | ||
|
||
### `echo` | ||
|
||
Ukázkou programu, který pracuje s více parametry je například `echo` (zvěna). Tento program vypíše zpět na obrazovku všechno, co mu zadáte jako parametry. | ||
|
||
```sh | ||
echo Ahoj | ||
``` | ||
|
||
### Chat | ||
|
||
Vést konverzaci se sebou samým je trochu zvláštní a rychle omrzí. Pokud si chcete popovídat s někým dalším, může vyzkoušet následující příkazy. | ||
|
||
První odešle zprávu do společného chatu. | ||
|
||
```sh | ||
npx @czechitas/chat send "Jak se máte?" | ||
``` | ||
|
||
Druhý vypíše všechny zprávy, které byly do chatu odeslány. | ||
|
||
```sh | ||
npx @czechitas/chat list | ||
``` | ||
|
||
Občas se program `npx` ještě dozeptá, jestli si do sebe může doinstalovat rozšiřující balíček `@czechitas/chat`. Otázku odsouhlasíte stisknutím klávesy :kbd[Enter]. | ||
|
||
```text | ||
Need to install the following packages: | ||
@czechitas/chat | ||
Ok to proceed? (y) | ||
``` | ||
|
||
::fig[npx serve]{src=assets/serve.png} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.