summaryrefslogtreecommitdiff
path: root/scripts/deploy/legacy_zsh_support
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-20 22:31:41 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-20 22:32:14 +0800
commitce77780ebcf548b0d823af7ae240364a56fa321a (patch)
tree4f71b68f944b143c0e0af1010bf189719d6e834c /scripts/deploy/legacy_zsh_support
parentab6be7968b25afb57fc428695693484ad8576718 (diff)
Remove legacy jv and jvv binaries and related filesjvn_0.1.1
Diffstat (limited to 'scripts/deploy/legacy_zsh_support')
-rw-r--r--scripts/deploy/legacy_zsh_support/how_to_install.md61
-rwxr-xr-xscripts/deploy/legacy_zsh_support/install.sh3
-rw-r--r--scripts/deploy/legacy_zsh_support/jvcs.plugin.zsh156
3 files changed, 0 insertions, 220 deletions
diff --git a/scripts/deploy/legacy_zsh_support/how_to_install.md b/scripts/deploy/legacy_zsh_support/how_to_install.md
deleted file mode 100644
index 343ea7b..0000000
--- a/scripts/deploy/legacy_zsh_support/how_to_install.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# 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.
diff --git a/scripts/deploy/legacy_zsh_support/install.sh b/scripts/deploy/legacy_zsh_support/install.sh
deleted file mode 100755
index aa92952..0000000
--- a/scripts/deploy/legacy_zsh_support/install.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/zsh
-cd "$(dirname "$0")"
-cp jvcs.plugin.zsh ~/.oh-my-zsh/custom/plugins/jvcs/jvcs.plugin.zsh
diff --git a/scripts/deploy/legacy_zsh_support/jvcs.plugin.zsh b/scripts/deploy/legacy_zsh_support/jvcs.plugin.zsh
deleted file mode 100644
index ff3f213..0000000
--- a/scripts/deploy/legacy_zsh_support/jvcs.plugin.zsh
+++ /dev/null
@@ -1,156 +0,0 @@
-# ████████ ████████
-# ██▒▒▒▒▒▒▒▒██ ██▒▒▒▒▒▒▒▒██
-# ██ ▒▒██ ██▒▒ ██ █████ ██ ██ ██████ █████
-# ██ ▒▒████████▒▒ ██ ▒▒▒██ ██ ██ ██████ ██████
-# ██ ▒▒▒▒▒▒▒▒ ██ ██ ██ ██ ███▒▒▒█ █▒▒▒▒█
-# ██ ██ ██ ██ ██ ███ ▒ ████ ▒
-# ██ ██ ██ ██ ██ ███ ▒████
-# ██ ████ ████ ██ ██ ▒██ ██▒ ███ ▒▒▒██
-# ██ ████ ████ ██ █ ██ ██ ██ ███ █ ██ ██
-# ██ ████ ████ ██ █ ██ ▒████▒ ▒██████ ██████
-# ██ ▒▒▒▒ ▒▒▒▒ █ ██ ▒████ ▒██▒ ██████ ▒████▒
-# ██ ██ ██ ▒▒▒▒ ▒▒ ▒▒▒▒▒▒ ▒▒▒▒
-# ██ ██████████ ██
-# ██ ██ JustEnoughVCS CommandLine
-# ████████████████████████████████ Zsh Plugin
-# ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
-
-autoload -Uz add-zsh-hook
-
-##################
-### APPEARANCE ###
-##################
-
-JVCS_VIEW='NORMAL'
-JVCS_PREFIX='['
-JVCS_SPLIT='/'
-JVCS_SUFFIX=']'
-
-###################
-### THEME READS ###
-###################
-
-JVCS_PROMPT_SEGMENT=''
-
-######################
-### INTERNAL STATE ###
-######################
-
-JVCS_DISPLAY=''
-JVCS_WS=''
-JVCS_ACCOUNT=''
-JVCS_SHEET=''
-JVCS_UPSTREAM=''
-
-###################
-### STATE LAYER ###
-###################
-
-jvcs_read_state() {
- if command -v jv &>/dev/null; then
- JVCS_WS="$(jv _workspace_dir 2>/dev/null)"
- JVCS_ACCOUNT="$(jv _account 2>/dev/null)"
- JVCS_SHEET="$(jv _sheet 2>/dev/null)"
- JVCS_UPSTREAM="$(jv _upstream 2>/dev/null)"
- else
- JVCS_WS=''
- JVCS_ACCOUNT=''
- JVCS_SHEET=''
- JVCS_UPSTREAM=''
- fi
-}
-
-##################
-### VIEW LAYER ###
-##################
-
-jvcs_compute_view() {
- # Must be in a Workspace, otherwise do not display
- if [[ -z "$JVCS_WS" ]]; then
- JVCS_DISPLAY=''
- return
- fi
- JVCS_DISPLAY='1'
-}
-
-####################
-### RENDER LAYER ###
-####################
-
-jvcs_render_prompt() {
- # Only set prompt segment if display is enabled
- if [[ -n "$JVCS_DISPLAY" ]]; then
- case "$JVCS_VIEW" in
- FULL)
- JVCS_PROMPT_SEGMENT="%{$fg[white]%}${JVCS_PREFIX}${JVCS_UPSTREAM}${JVCS_SPLIT}${JVCS_ACCOUNT}${JVCS_SPLIT}${JVCS_SHEET}${JVCS_SUFFIX} %{$reset_color%}"
- ;;
- NORMAL)
- JVCS_PROMPT_SEGMENT="%{$fg[white]%}${JVCS_PREFIX}${JVCS_ACCOUNT}${JVCS_SPLIT}${JVCS_SHEET}${JVCS_SUFFIX} %{$reset_color%}"
- ;;
- SHORT)
- JVCS_PROMPT_SEGMENT="%{$fg[white]%}${JVCS_PREFIX}${JVCS_SHEET}${JVCS_SUFFIX} %{$reset_color%}"
- ;;
- *)
- JVCS_PROMPT_SEGMENT=''
- ;;
- esac
- else
- JVCS_PROMPT_SEGMENT=''
- fi
-}
-
-####################
-### ORCHESTRATOR ###
-####################
-
-jvcs_update() {
- jvcs_read_state
- jvcs_compute_view
- jvcs_render_prompt
-}
-
-#############
-### HOOKS ###
-#############
-
-JVCS_NEED_REFRESH=0
-
-jvcs_preexec() {
- case "$1" in
- jv\ status | \
- jv\ use* | \
- jv\ as* | \
- jv\ exit | \
- jv\ sheet\ use* | \
- jv\ sheet\ sheet\ exit | \
- jv\ account\ as*)
- JVCS_NEED_REFRESH=1
- ;;
- esac
-}
-
-jvcs_precmd() {
- [[ "$JVCS_NEED_REFRESH" -eq 1 ]] || return
- JVCS_NEED_REFRESH=0
- jvcs_update
-}
-
-jvcs_chpwd() {
- jvcs_update
-}
-
-add-zsh-hook preexec jvcs_preexec
-add-zsh-hook precmd jvcs_precmd
-add-zsh-hook chpwd jvcs_chpwd
-
-###############################
-### FALLBACK INITIALIZATION ###
-###############################
-
-jvcs_precmd_init() {
- [[ -n "${JVCS_INITIALIZED:-}" ]] && return
- JVCS_INITIALIZED=1
- jvcs_update
-}
-
-add-zsh-hook precmd jvcs_precmd_init