From 5567dd6cffed8bd31a73f63a879106162b7b86a0 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 6 Nov 2025 22:07:06 +0800 Subject: feat: add shell integration and completion scripts - Add cli.sh for aliases and completion loading - Create completion_jv.sh for jv command bash completion - Create completion_jvv.sh for jvv command bash completion - Support dynamic completion using --raw output from commands --- scripts/cli.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scripts/cli.sh (limited to 'scripts/cli.sh') diff --git a/scripts/cli.sh b/scripts/cli.sh new file mode 100644 index 0000000..ba21c54 --- /dev/null +++ b/scripts/cli.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Get the real directory where this script is located +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" + +# Aliases +alias jvh='jv here' +alias jvu='jv update' +alias jvt='jv track' + +# Completion +if [ -f "$SCRIPT_DIR/completion_jv.sh" ]; then + source "$SCRIPT_DIR/completion_jv.sh" +fi +if [ -f "$SCRIPT_DIR/completion_jvv.sh" ]; then + source "$SCRIPT_DIR/completion_jvv.sh" +fi + +# Add bin directory to PATH +if [ -d "$SCRIPT_DIR/bin" ]; then + export PATH="$SCRIPT_DIR/bin:$PATH" +fi -- cgit