diff --git a/share/completions/rsync.fish b/share/completions/rsync.fish index 79cf6e19f..6d860099b 100644 --- a/share/completions/rsync.fish +++ b/share/completions/rsync.fish @@ -205,6 +205,7 @@ complete -c rsync -d "Remote path" -n "commandline -ct | string match -q '*:*'" )( # Get the list of remote files from the specified rsync server. rsync --list-only (__rsync_remote_target) 2>/dev/null | string replace -r '^d.*' '\$0/' | - string replace -r '(\S+\s+){4}' '' $(set -q new_escaping[1]; or echo ' | string escape -n'; echo) + string replace -r '(\S+\s+){4}' '' | + string match --invert './' $(set -q new_escaping[1]; or echo ' | string escape -n'; echo) ) "