mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
10
tldr/gum
10
tldr/gum
@@ -7,11 +7,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Make glamorous shell scripts.
|
||||
> See also: `whiptail`, `dialog`.
|
||||
> More information: <https://github.com/charmbracelet/gum>.
|
||||
> More information: <https://github.com/charmbracelet/gum#tutorial>.
|
||||
|
||||
- Interactively pick a specific option to print to `stdout`:
|
||||
|
||||
`gum choose "{{option_1}}" "{{option_2}}" "{{option_3}}"`
|
||||
`gum choose {{"option1" "option2" "..."}}`
|
||||
|
||||
- Open an interactive prompt for the user to input a string with a specific placeholder:
|
||||
|
||||
@@ -23,12 +23,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show a spinner while a command is taking place with text alongside:
|
||||
|
||||
`gum spin {{[-s|--spinner]}} {{dot|line|minidot|jump|pulse|points|globe|moon|monkey|meter|hamburger}} --title "{{loading...}}" -- {{command}}`
|
||||
`gum spin {{[-s|--spinner]}} {{dot|line|minidot|jump|pulse|points|globe|moon|monkey|meter|hamburger}} --title "{{loading...}}" {{command}}`
|
||||
|
||||
- Format text to include emojis:
|
||||
|
||||
`gum format {{[-t|--type]}} {{emoji}} "{{:smile: :heart: hello}}"`
|
||||
|
||||
- Interactively prompt for multi-line text (`<Ctrl d>` to save) and write to `data.txt`:
|
||||
- Interactively prompt for multi-line text and write the input to a file:
|
||||
|
||||
`gum write > {{data.txt}}`
|
||||
`gum write > {{path/to/file}}`
|
||||
|
||||
@@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Show the contents of a unit file for a template:
|
||||
|
||||
`systemctl cat {{template@}}`
|
||||
|
||||
- Show the contents of a user unit file:
|
||||
|
||||
`systemctl cat --user {{unit}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Stop a service from running on boot and stop its current execution:
|
||||
|
||||
`systemctl disable {{unit}} --now`
|
||||
|
||||
- Stop a user service from running on login:
|
||||
|
||||
`systemctl disable --user {{unit}}`
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Edit systemd unit files.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#edit%20UNIT%E2%80%A6>.
|
||||
|
||||
- Replace a unit file non-destructively:
|
||||
- Overlay a unit file non-destructively:
|
||||
|
||||
`sudo systemctl edit {{unit_file}}`
|
||||
|
||||
@@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Create a new unit file:
|
||||
|
||||
`sudo systemctl edit {{[-lf|--full --force]}} {{unit_file}}`
|
||||
|
||||
- Overlay a user unit file:
|
||||
|
||||
`systemctl edit --user {{unit_file}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Enable a service to run on boot and start it now:
|
||||
|
||||
`systemctl enable {{unit}} --now`
|
||||
|
||||
- Enable a user unit to run on login:
|
||||
|
||||
`systemctl enable --user {{unit}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Ensure that the service is shut down while masking:
|
||||
|
||||
`systemctl mask {{service_name}} --now`
|
||||
|
||||
- Mask a user service:
|
||||
|
||||
`sysemctl mask --user {{service_name}}`
|
||||
|
||||
@@ -16,3 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Restart more than one unit:
|
||||
|
||||
`systemctl restart {{unit1 unit2 ...}}`
|
||||
|
||||
- Restart a user unit:
|
||||
|
||||
`systemctl restart --user {{unit}}`
|
||||
|
||||
@@ -11,3 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Start a unit:
|
||||
|
||||
`systemctl start {{unit}}`
|
||||
|
||||
- Start a user unit:
|
||||
|
||||
`systemctl start --user {{unit}}`
|
||||
|
||||
@@ -31,3 +31,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- List all units with a specific state:
|
||||
|
||||
`systemctl status --state {{active|inactive|failed}}`
|
||||
|
||||
- Show the status of a user unit:
|
||||
|
||||
`systemctl status --user {{unit}}`
|
||||
|
||||
@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Stop a service and suppress warnings:
|
||||
|
||||
`systemctl stop --no-warn {{unit}}`
|
||||
|
||||
- Stop a user unit:
|
||||
|
||||
`systemctl stop --user {{unit}}`
|
||||
|
||||
2
tldr/yes
2
tldr/yes
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# yes
|
||||
|
||||
> Output something repeatedly.
|
||||
> This command is commonly used to answer yes to every prompt by install commands (such as apt-get).
|
||||
> This command is commonly used to answer yes to every prompt by install commands (such as `apt-get`).
|
||||
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/yes-invocation.html>.
|
||||
|
||||
- Repeatedly output "message":
|
||||
|
||||
Reference in New Issue
Block a user