From 6b2d120077e4a1c240d3d62e5b6e228eb88dd4a3 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sun, 31 Oct 2021 14:31:26 -0700 Subject: users/27302: _remote_files respects setting of AUTO_REMOVE_SLASH option --- Completion/Unix/Type/_remote_files | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Unix/Type/_remote_files b/Completion/Unix/Type/_remote_files index b537406a0..93e1b7f43 100644 --- a/Completion/Unix/Type/_remote_files +++ b/Completion/Unix/Type/_remote_files @@ -85,12 +85,15 @@ if zstyle -T ":completion:${curcontext}:files" remote-access; then remdispf=( ${(M)remdispf:#${~glob[2]}} ) fi + local -a autoremove + [[ -o autoremoveslash ]] && autoremove=(-r "/ \t\n\-") + _tags remote-files while _tags; do while _next_label remote-files expl ${suf:-remote directory}; do [[ -n $suf ]] && compadd "$args[@]" "$expl[@]" -d remdispf -- ${(q)remdispf%[*=|]} && ret=0 - compadd ${suf:+-S/} -r "/ \t\n\-" "$args[@]" "$expl[@]" -d remdispd \ + compadd ${suf:+-S/} $autoremove "$args[@]" "$expl[@]" -d remdispd \ -- ${(q)remdispd%/} && ret=0 done (( ret )) || return 0 -- cgit 1.4.1