summaryrefslogtreecommitdiff
path: root/scripts/deploy/zsh_support/how_to_install.md
blob: 343ea7b6d12eef61e5cb5fbf7706ec9ef06cd92c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# How to Install

Before installing, please ensure:

* [Oh My Zsh](https://ohmyz.sh/) is installed.
* Your current shell is **Zsh**.

---

## Install the Zsh Plugin

In your terminal, run:

```bash
./install.sh
```

This script will install JVCS's Zsh support files locally and prepare the prompt segment definitions for use by your theme.

---

## Configure Your Zsh Theme

Open your current Zsh theme file (e.g., `~/.oh-my-zsh/themes/xxx.zsh-theme`) and paste the following content in an appropriate location:

```bash
# ----------------------------------------------------- #
# DISPLAY_LEVEL
# FULL   = 127.0.0.1:25331/account/sheet
# NORMAL =                 account/sheet
# SHORT  =                         sheet
JVCS_VIEW='NORMAL'

# Customizable prompt segment elements
JVCS_PREFIX='['
JVCS_SPLIT='/'
JVCS_SUFFIX=']'

# JVCS_PROMPT_SEGMENT default style:
# [your_account/your_sheet]

# Append JVCS prompt segment
PROMPT+='${JVCS_PROMPT_SEGMENT}'
# ----------------------------------------------------- #
```

After saving, reload your terminal, or run:

```bash
source ~/.zshrc
```

---

## Notes

* `JVCS_VIEW` controls the view level displayed in the prompt.
* `JVCS_PREFIX / SPLIT / SUFFIX` are used to customize the appearance.
* `JVCS_PROMPT_SEGMENT` is only responsible for displaying the status and does not execute any logic.

No further configuration is required.