diff options
| author | Paul Buetow <paul@buetow.org> | 2025-05-20 23:15:48 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-05-20 23:15:48 +0300 |
| commit | 079a4283a87b5fd46987f3404d4bb9279c46b80c (patch) | |
| tree | 659510b889d09611e58869e035c41844f37cc7da | |
| parent | fc400daa7173df4596aed1eadbcea37d2c8daf26 (diff) | |
fix
| -rwxr-xr-x | dotfiles/scripts/hx.aichat-prompt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dotfiles/scripts/hx.aichat-prompt b/dotfiles/scripts/hx.aichat-prompt index 72848ed..4cafcf5 100755 --- a/dotfiles/scripts/hx.aichat-prompt +++ b/dotfiles/scripts/hx.aichat-prompt @@ -1,3 +1,9 @@ #!/usr/bin/env zsh -aichat "$(hx.prompt). $@ Answer only. If it is code, code only without code-block at the beginning and the end." +declare -xr INSTRUCTIONS='Answer only. If it is code, code only without code-block at the beginning and the end.' + +if [[ $# -eq 0 ]]; then + aichat "$(hx.prompt). $INSTRUCTIONS" +else + aichat "$@. $INSTRUCTIONS" +fi |
