mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 20:15:23 +00:00
feat(shell): support completion in the middle of a prompt
This commit is contained in:
parent
d4913d73f6
commit
a908799c7e
@ -5,8 +5,8 @@ function tv_smart_autocomplete
|
|||||||
|
|
||||||
if test -n "$output"
|
if test -n "$output"
|
||||||
# add a space if the prompt does not end with one (unless the prompt is an implicit cd, e.g. '\.')
|
# 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 "
|
string match -q -r '.*( |./)$' -- "$current_prompt" || set output " $output"
|
||||||
commandline -r "$current_prompt$output"
|
commandline -i "$output"
|
||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user