Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .claude-plugin/skills/revdiff/scripts/launch-revdiff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ POPUP_H="${REVDIFF_POPUP_HEIGHT:-90%}"

# tmux: display-popup -E blocks until command exits
if [ -n "${TMUX:-}" ] && command -v tmux >/dev/null 2>&1; then
tmux display-popup -E -w "$POPUP_W" -h "$POPUP_H" -T " $OVERLAY_TITLE " -d "$CWD" -- sh -c "$REVDIFF_CMD"
# -T (title) requires tmux 3.3+; skip on older versions
TMUX_ARGS=(tmux display-popup -E -w "$POPUP_W" -h "$POPUP_H")
if [[ "$(tmux -V 2>/dev/null)" =~ ([0-9]+)\.([0-9]+) ]]; then
if [ "${BASH_REMATCH[1]}" -gt 3 ] || { [ "${BASH_REMATCH[1]}" -eq 3 ] && [ "${BASH_REMATCH[2]}" -ge 3 ]; }; then
TMUX_ARGS+=(-T " $OVERLAY_TITLE ")
fi
fi
TMUX_ARGS+=(-d "$CWD" -- sh -c "$REVDIFF_CMD")
"${TMUX_ARGS[@]}"
cat "$OUTPUT_FILE"
exit 0
fi
Expand Down
3 changes: 1 addition & 2 deletions cmd/revdiff/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"

tea "github.com/charmbracelet/bubbletea"
Expand Down Expand Up @@ -103,7 +102,7 @@ func main() {

// early-exit commands that don't need theme resolution
if opts.Version {
fmt.Printf("version: %s\ngo: %s\n", revision, runtime.Version())
fmt.Printf("version: %s\n", revision)
os.Exit(0)
}

Expand Down
10 changes: 9 additions & 1 deletion plugins/revdiff-planning/scripts/launch-plan-review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ OVERLAY_TITLE="plan: $(basename "$PLAN_FILE")"

# tmux: display-popup -E blocks until command exits
if [ -n "${TMUX:-}" ] && command -v tmux >/dev/null 2>&1; then
tmux display-popup -E -w 90% -h 90% -T " $OVERLAY_TITLE " -- sh -c "$REVDIFF_CMD"
# -T (title) requires tmux 3.3+; skip on older versions
TMUX_ARGS=(tmux display-popup -E -w 90% -h 90%)
if [[ "$(tmux -V 2>/dev/null)" =~ ([0-9]+)\.([0-9]+) ]]; then
if [ "${BASH_REMATCH[1]}" -gt 3 ] || { [ "${BASH_REMATCH[1]}" -eq 3 ] && [ "${BASH_REMATCH[2]}" -ge 3 ]; }; then
TMUX_ARGS+=(-T " $OVERLAY_TITLE ")
fi
fi
TMUX_ARGS+=(-- sh -c "$REVDIFF_CMD")
"${TMUX_ARGS[@]}"
cat "$OUTPUT_FILE"
exit 0
fi
Expand Down
Loading