mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:24:47 +08:00
rsync completions: rework transformation of file list
Accounts for filenames that contain spaces. Closes #1872.
This commit is contained in:
parent
39748870b6
commit
1ff9aba6b1
|
@ -129,6 +129,6 @@ complete -c rsync -d "Remote path" -n "commandline -ct|sgrep -q :" -a "
|
|||
commandline -ct|sgrep -Eo '.*:+(.*/)?'
|
||||
)(
|
||||
#Get the list of remote files from the specified rsync server
|
||||
rsync --list-only (commandline -ct|sgrep -Eo '.*:+(.*/)?') ^/dev/null | awk '{if (\$1 ~ \"^d\" ) {print \$NF \"/\";} else {print \$NF;} };'
|
||||
rsync --list-only (commandline -ct|sgrep -Eo '.*:+(.*/)?') ^/dev/null | sed '/^d/ s,\$,/, ' | tr -s ' '| cut -d' ' -f 5-
|
||||
)
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue
Block a user