fix: автоматическая установка jq и неинтерактивный пункт 1 setup
- устанавливать jq автоматически, необходим для statusline-command.sh - не спрашивать GitHub PAT в пункте 1, пропускать marketplace без GITHUB_TOKEN - добавлена документация по Unicode-рендерингу статусной строки Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
home-configs/claude/README.md
Normal file
28
home-configs/claude/README.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Claude Code configuration
|
||||||
|
|
||||||
|
## Statusline (`statusline-command.sh`)
|
||||||
|
|
||||||
|
The custom statusline script renders **only ASCII-safe characters and ANSI color codes**:
|
||||||
|
|
||||||
|
- ASCII brackets `[ ]` for git branch and effort level
|
||||||
|
- ANSI 256-color escape sequences for model names, effort levels, and rate-limit percentages
|
||||||
|
- The `¥` symbol (U+00A5) for CNY balance in DeepSeek output
|
||||||
|
|
||||||
|
It does **not** use Nerd Font glyphs, powerline separators, or emoji.
|
||||||
|
|
||||||
|
### Unicode symbols you may see in the TUI
|
||||||
|
|
||||||
|
Some symbols that appear in the Claude Code interface are **rendered by Claude Code's own TUI**, not by this statusline script. For example, arrow symbols such as `⏵` (used before "bypass permissions on" prompts) are drawn by Claude Code itself.
|
||||||
|
|
||||||
|
If these symbols display as boxes or question marks, install a Unicode-capable font such as:
|
||||||
|
|
||||||
|
- **Noto Color Emoji** (recommended on Linux)
|
||||||
|
- Any terminal font with full Unicode support
|
||||||
|
|
||||||
|
To install Noto Color Emoji on Debian/Ubuntu:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt-get install -y fonts-noto-color-emoji
|
||||||
|
```
|
||||||
|
|
||||||
|
The statusline script itself does not require emoji fonts.
|
||||||
@@ -35,6 +35,23 @@ if ! command -v python3 &>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
success "Python 3 найден"
|
success "Python 3 найден"
|
||||||
|
|
||||||
|
info "Проверяю зависимости (jq)..."
|
||||||
|
if ! command -v jq &>/dev/null; then
|
||||||
|
info "Устанавливаю jq (нужен sudo)..."
|
||||||
|
if command -v apt-get &>/dev/null; then
|
||||||
|
sudo apt-get install -y jq
|
||||||
|
elif command -v dnf &>/dev/null; then
|
||||||
|
sudo dnf install -y jq
|
||||||
|
else
|
||||||
|
warn "Не удалось установить jq автоматически. Установите вручную."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if command -v jq &>/dev/null; then
|
||||||
|
success "jq найден"
|
||||||
|
else
|
||||||
|
warn "jq не найден. statusline-command.sh и некоторые функции могут не работать."
|
||||||
|
fi
|
||||||
|
|
||||||
# ── VLESS URL parser ───────────────────────────────────────────
|
# ── VLESS URL parser ───────────────────────────────────────────
|
||||||
# Принимает vless:// URL, устанавливает переменные VL_*
|
# Принимает vless:// URL, устанавливает переменные VL_*
|
||||||
parse_vless_url() {
|
parse_vless_url() {
|
||||||
@@ -857,15 +874,9 @@ else
|
|||||||
if [ -n "$existing" ]; then
|
if [ -n "$existing" ]; then
|
||||||
success "Маркетплейс claude-plugins-official уже добавлен"
|
success "Маркетплейс claude-plugins-official уже добавлен"
|
||||||
else
|
else
|
||||||
# Берём токен из env или спрашиваем
|
# Берём токен только из env; в неинтерактивном режиме не спрашиваем
|
||||||
if [ -z "$GITHUB_TOKEN" ]; then
|
if [ -z "$GITHUB_TOKEN" ]; then
|
||||||
echo ""
|
warn "GITHUB_TOKEN не задан, пропускаю настройку маркетплейса плагинов"
|
||||||
echo "Для установки плагинов Claude нужен GitHub Personal Access Token."
|
|
||||||
echo "Создать можно на: https://github.com/settings/tokens (без scope, только public repos)"
|
|
||||||
read -rp "GitHub PAT (или Enter чтобы пропустить): " GITHUB_TOKEN
|
|
||||||
fi
|
|
||||||
if [ -z "$GITHUB_TOKEN" ]; then
|
|
||||||
warn "Токен не указан, маркетплейс плагинов не настроен"
|
|
||||||
warn "Позже запустите: claude plugin marketplace add https://TOKEN@github.com/anthropics/claude-plugins-official.git"
|
warn "Позже запустите: claude plugin marketplace add https://TOKEN@github.com/anthropics/claude-plugins-official.git"
|
||||||
else
|
else
|
||||||
if claude plugin marketplace add "https://${GITHUB_TOKEN}@github.com/anthropics/claude-plugins-official.git" 2>&1; then
|
if claude plugin marketplace add "https://${GITHUB_TOKEN}@github.com/anthropics/claude-plugins-official.git" 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user