Skip to content

Commit 41c88ba

Browse files
committed
bin: add vclaude script
1 parent 472dc8f commit 41c88ba

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

bin/vclaude

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
# Usage: vclaude [options]
3+
#
4+
# NAME
5+
# vclaude -- Opens a tmux session with vim and claude code side by side
6+
#
7+
# SYNOPSIS
8+
# vclaude
9+
#
10+
# DESCRIPTION
11+
# vclaude opens a new tmux session with vim on the left and claude code on
12+
# the right.
13+
#
14+
# OPTIONS
15+
# -h, --help
16+
# Print this help message and exit
17+
18+
if [[ "$DEBUG" ]]; then
19+
export PS4='+ [${BASH_SOURCE[0]##*/}:${LINENO}${FUNCNAME[0]:+:${FUNCNAME[0]}()}] '
20+
set -x
21+
fi
22+
23+
set -euo pipefail
24+
25+
if [[ "${1:-}" =~ ^(-h|--help)$ ]]; then
26+
sed -ne '/^#/!q;s/^#$/# /;/^# /s/^# //p' < "$0" |
27+
awk -v f="${1#-h}" '!f && /^Usage:/ || u { u=!/^s*(eg:)?$/; if (!u) exit } u || f'
28+
exit 1
29+
fi
30+
31+
tmux new-session \; split-window -h -p 40 \; send-keys -t 1 'vim' C-m \; send-keys -t 2 'claude' C-m

0 commit comments

Comments
 (0)