summaryrefslogtreecommitdiff
path: root/gemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-10-02 11:31:38 +0300
committerPaul Buetow <paul@buetow.org>2025-10-02 11:31:38 +0300
commitff9f3a641fec256e1f4b01fcd95590451f656f0a (patch)
tree04f4b0d8d370006bd2cc22e35c4ce76f7ba134d6 /gemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt
parentc0f9ecf5e0b075db8e54ef1235ec80878e418398 (diff)
Update content for html
Diffstat (limited to 'gemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt')
-rwxr-xr-xgemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt32
1 files changed, 0 insertions, 32 deletions
diff --git a/gemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt b/gemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt
deleted file mode 100755
index dcb28376..00000000
--- a/gemfeed/examples/conf/dotfiles/scripts/hx.nvim-copilot-prompt
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env zsh
-
-declare -r STDIN_FILE=~/.copilot_prompt_stdin.txt
-declare -r INPUT_FILE=~/.copilot_chat_input.txt
-declare -r OUTPUT_FILE=~/.copilot_chat_output.txt
-declare INPUT_PROMPT
-
-if [ -f $OUTPUT_FILE.done ]; then
- rm $OUTPUT_FILE.done
-fi
-cat > $STDIN_FILE &>/dev/null
-
-if [ $# -eq 0 ]; then
- INPUT_PROMPT="$(hx.prompt)"
-else
- INPUT_PROMPT="$@"
-fi
-
-cat <<INPUT_FILE > $INPUT_FILE
-$INPUT_PROMPT for the following:
-
-$(cat $STDIN_FILE)
-
-If the result is code, print out the code only, don't print the \`\`\`-markers around the code block.
-INPUT_FILE
-
-tmux split-window -v "nvim +':CopilotAsk'; mv $OUTPUT_FILE $OUTPUT_FILE.done"
-
-while [ ! -f "$OUTPUT_FILE.done" ]; do
- sleep 0.2
-done
-sed -n '/^## Copilot/,/^## User/ { /^## Copilot/d; /\[file:/d; /^## User/d; p; }' $OUTPUT_FILE.done