mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-06 03:25:23 +00:00
fix(fish): don't add extra space to prompt if it's an implicit cd (\.
) (#259)
Fixes #256
This commit is contained in:
parent
3b7fb0c6d6
commit
b388a56745
@ -4,8 +4,8 @@ function tv_smart_autocomplete
|
||||
set -l output (tv --autocomplete-prompt "$current_prompt")
|
||||
|
||||
if test -n "$output"
|
||||
# add a space if the prompt does not end with one
|
||||
string match -q "* " -- "$current_prompt" || set current_prompt "$current_prompt "
|
||||
# add a space if the prompt does not end with one (unless the prompt is an implicit cd, e.g. '\.')
|
||||
string match -r '.*( |./)$' -- "$current_prompt" || set current_prompt "$current_prompt "
|
||||
commandline -r "$current_prompt$output"
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user