From 1951d10024b6975c97fc30d894adb2129c858f16 Mon Sep 17 00:00:00 2001 From: quidnu <76596548+quidnu@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:36:09 -0500 Subject: [PATCH] Update llm-cmd-comp.zsh Optionally allow choosing the model in zsh by setting the environment variable LLMCMDCOMP_MODEL. This allows you to set the model llm cmd uses independently of the default model. This allows you to use a different model from the default model set in llm. I typically want a faster or different model for llm cmdcomp than when I use llm directly or other commands that use llm which use the defaults. --- llm_cmd_comp/share/llm-cmd-comp.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm_cmd_comp/share/llm-cmd-comp.zsh b/llm_cmd_comp/share/llm-cmd-comp.zsh index 043571a..7507630 100644 --- a/llm_cmd_comp/share/llm-cmd-comp.zsh +++ b/llm_cmd_comp/share/llm-cmd-comp.zsh @@ -5,7 +5,7 @@ __llm_cmdcomp() { local old_cmd=$BUFFER local cursor_pos=$CURSOR echo # Start the program on a blank line - local result=$(llm cmdcomp "$old_cmd") + local result=$(llm cmdcomp ${LLMCMDCOMP_MODEL:+-m$LLMCMDCOMP_MODEL} "$old_cmd") if [ $? -eq 0 ] && [ ! -z "$result" ]; then BUFFER=$result else