Skip to content

Commit 4be335d

Browse files
committed
fix: 🐛 クリップボードを経由せず直接catする
1 parent db2bb9a commit 4be335d

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

slides.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,6 @@ layout: default
492492

493493
```lua
494494
local wezterm = require("wezterm")
495-
496495
local module = {}
497496
498497
-- nvim で編集して Claude Code の入力欄へ送り込むアクションを定義
@@ -595,19 +594,17 @@ function module.edit_prompt()
595594
if [ -s "$temp_file" ]; then
596595
content=$(cat "$temp_file")
597596
if [ -n "$content" ]; then
598-
# クリップボードへ投入
599-
echo "$content" | pbcopy
600-
# 一時ファイルを削除
601-
rm -f "$temp_file"
602-
603597
echo "✓ Sending prompt to Claude Code..."
604598
605599
# 既存入力を Ctrl+L の生キー送信でクリア
606600
$wezterm_cli send-text --pane-id="$pane_id" --no-paste $'\x0c'
607601
sleep 0.05
608602
609-
# bracketed paste で複数行を安定送信
610-
pbpaste | $wezterm_cli send-text --pane-id="$pane_id"
603+
# tmpfileから直接 bracketed paste で複数行を送信
604+
cat "$temp_file" | $wezterm_cli send-text --pane-id="$pane_id"
605+
606+
# 一時ファイルを削除
607+
rm -f "$temp_file"
611608
612609
echo "✓ Done!"
613610
sleep 0.5

0 commit comments

Comments
 (0)