|
|
|
@ -3,7 +3,8 @@ |
|
|
|
The systemd plugin provides many useful aliases for systemd. |
|
|
|
The systemd plugin provides many useful aliases for systemd. |
|
|
|
|
|
|
|
|
|
|
|
To use it, add systemd to the plugins array of your zshrc file: |
|
|
|
To use it, add systemd to the plugins array of your zshrc file: |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```zsh |
|
|
|
plugins=(... systemd) |
|
|
|
plugins=(... systemd) |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
@ -22,7 +23,7 @@ plugins=(... systemd) |
|
|
|
| `sc-show-environment` | `systemctl show-environment` | Dump the systemd manager environment block | |
|
|
|
| `sc-show-environment` | `systemctl show-environment` | Dump the systemd manager environment block | |
|
|
|
| `sc-cat` | `systemctl cat` | Show backing files of one or more units | |
|
|
|
| `sc-cat` | `systemctl cat` | Show backing files of one or more units | |
|
|
|
| `sc-list-timers` | `systemctl list-timers` | List timer units currently in memory | |
|
|
|
| `sc-list-timers` | `systemctl list-timers` | List timer units currently in memory | |
|
|
|
| **Aliases with sudo** | |
|
|
|
| **Aliases with sudo** ||| |
|
|
|
| `sc-start` | `sudo systemctl start` | Start Unit(s) | |
|
|
|
| `sc-start` | `sudo systemctl start` | Start Unit(s) | |
|
|
|
| `sc-stop` | `sudo systemctl stop` | Stop Unit(s) | |
|
|
|
| `sc-stop` | `sudo systemctl stop` | Stop Unit(s) | |
|
|
|
| `sc-reload` | `sudo systemctl reload` | Reload Unit(s) | |
|
|
|
| `sc-reload` | `sudo systemctl reload` | Reload Unit(s) | |
|
|
|
@ -59,9 +60,11 @@ to your prompt, drop `$(systemd_prompt_info [unit]...)` into your prompt (more t |
|
|
|
may be specified). |
|
|
|
may be specified). |
|
|
|
|
|
|
|
|
|
|
|
The plugin will add the following to your prompt for each `$unit`. |
|
|
|
The plugin will add the following to your prompt for each `$unit`. |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
```text |
|
|
|
<prefix><unit>:<active|notactive><suffix> |
|
|
|
<prefix><unit>:<active|notactive><suffix> |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
You can control these parts with the following variables: |
|
|
|
You can control these parts with the following variables: |
|
|
|
|
|
|
|
|
|
|
|
- `<prefix>`: Set `$ZSH_THEME_SYSTEMD_PROMPT_PREFIX`. |
|
|
|
- `<prefix>`: Set `$ZSH_THEME_SYSTEMD_PROMPT_PREFIX`. |
|
|
|
@ -79,7 +82,7 @@ You can control these parts with the following variables: |
|
|
|
|
|
|
|
|
|
|
|
For example, if your prompt contains `PROMPT='$(systemd_prompt_info dhcpd httpd)'` and you set the following variables: |
|
|
|
For example, if your prompt contains `PROMPT='$(systemd_prompt_info dhcpd httpd)'` and you set the following variables: |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
```sh |
|
|
|
ZSH_THEME_SYSTEMD_PROMPT_PREFIX="[" |
|
|
|
ZSH_THEME_SYSTEMD_PROMPT_PREFIX="[" |
|
|
|
ZSH_THEME_SYSTEMD_PROMPT_SUFFIX="]" |
|
|
|
ZSH_THEME_SYSTEMD_PROMPT_SUFFIX="]" |
|
|
|
ZSH_THEME_SYSTEMD_PROMPT_ACTIVE="+" |
|
|
|
ZSH_THEME_SYSTEMD_PROMPT_ACTIVE="+" |
|
|
|
@ -89,6 +92,6 @@ ZSH_THEME_SYSTEMD_PROMPT_CAPS=1 |
|
|
|
|
|
|
|
|
|
|
|
If `dhcpd` is running, and `httpd` is not, then your prompt will look like this: |
|
|
|
If `dhcpd` is running, and `httpd` is not, then your prompt will look like this: |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
```text |
|
|
|
[DHCPD: +][HTTPD: X] |
|
|
|
[DHCPD: +][HTTPD: X] |
|
|
|
``` |
|
|
|
``` |
|
|
|
|