Compare commits
2 Commits
e73b5c586c
...
3505030c96
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3505030c96 | ||
|
|
45072ddb91 |
11
bin/zclaude
Executable file
11
bin/zclaude
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -E -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
export ANTHROPIC_BASE_URL="http://nvidia.hell:11434"
|
||||||
|
export ANTHROPIC_AUTH_TOKEN="ollama"
|
||||||
|
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k2.7-code:cloud"
|
||||||
|
export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-5.2:cloud"
|
||||||
|
export ANTHROPIC_DEFAULT_HAIKU_MODEL="minimax-m3:cloud"
|
||||||
|
|
||||||
|
exec claude "$@"
|
||||||
@@ -1,16 +1,39 @@
|
|||||||
if [ -d "$HOME/.bash-git-prompt" ]; then
|
# shellcheck shell=bash
|
||||||
GIT_PROMPT_PATH="$HOME/.bash-git-prompt"
|
|
||||||
else
|
# Find gitprompt.sh across supported installation methods.
|
||||||
GIT_PROMPT_PATH="$LWS/opt/bash-git-prompt"
|
|
||||||
|
GIT_PROMPT_CANDIDATES=(
|
||||||
|
"$HOME/.bash-git-prompt/gitprompt.sh"
|
||||||
|
"$LWS/opt/bash-git-prompt/gitprompt.sh"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Detect active Homebrew prefix and add its bash-git-prompt path.
|
||||||
|
# This covers macOS Apple Silicon/Intel, Linuxbrew and any custom prefix.
|
||||||
|
if can_run brew; then
|
||||||
|
git_prompt_brew_prefix=$(brew --prefix bash-git-prompt 2>/dev/null) || git_prompt_brew_prefix=""
|
||||||
|
if [[ -n "$git_prompt_brew_prefix" ]]; then
|
||||||
|
GIT_PROMPT_CANDIDATES+=("$git_prompt_brew_prefix/share/gitprompt.sh")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
GIT_PROMPT_INIT="$GIT_PROMPT_PATH/gitprompt.sh"
|
GIT_PROMPT_INIT=""
|
||||||
|
for candidate in "${GIT_PROMPT_CANDIDATES[@]}"; do
|
||||||
|
if [[ -f "$candidate" ]]; then
|
||||||
|
GIT_PROMPT_INIT="$candidate"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -n "$GIT_PROMPT_INIT" ]]; then
|
||||||
|
# __GIT_PROMPT_DIR is required so gitprompt.sh can find themes and gitstatus.sh
|
||||||
|
__GIT_PROMPT_DIR="$(dirname "$GIT_PROMPT_INIT")"
|
||||||
|
export __GIT_PROMPT_DIR
|
||||||
|
|
||||||
if [ -f "$GIT_PROMPT_INIT" ]; then
|
|
||||||
export GIT_PROMPT_PATH
|
|
||||||
GIT_PROMPT_ONLY_IN_REPO=1
|
GIT_PROMPT_ONLY_IN_REPO=1
|
||||||
GIT_PROMPT_USER_HOST="${LWS_PS1_USER_HOST}"
|
GIT_PROMPT_USER_HOST="${LWS_PS1_USER_HOST}"
|
||||||
GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${GIT_PROMPT_USER_HOST}"
|
GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${GIT_PROMPT_USER_HOST}"
|
||||||
GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"
|
GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"
|
||||||
source "$GIT_PROMPT_INIT"
|
source "$GIT_PROMPT_INIT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
unset GIT_PROMPT_INIT git_prompt_brew_prefix
|
||||||
|
|||||||
Reference in New Issue
Block a user