From a908799c7e49be17e1974d92dc27b75556cfca18 Mon Sep 17 00:00:00 2001 From: dkmar Date: Mon, 7 Apr 2025 02:57:10 -0700 Subject: [PATCH] feat(shell): support completion in the middle of a prompt --- television/utils/shell/completion.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/television/utils/shell/completion.fish b/television/utils/shell/completion.fish index c02cb00..b7994cc 100644 --- a/television/utils/shell/completion.fish +++ b/television/utils/shell/completion.fish @@ -5,8 +5,8 @@ function tv_smart_autocomplete if test -n "$output" # add a space if the prompt does not end with one (unless the prompt is an implicit cd, e.g. '\.') - string match -q -r '.*( |./)$' -- "$current_prompt" || set current_prompt "$current_prompt " - commandline -r "$current_prompt$output" + string match -q -r '.*( |./)$' -- "$current_prompt" || set output " $output" + commandline -i "$output" commandline -f repaint end end