From 70411169809410901ba6f90b668a69eec2002003 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 20 Jan 2000 09:15:32 +0000 Subject: zsh-workers/9383 --- Completion/Builtins/_zstyle | 2 ++ Completion/Core/_path_files | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'Completion') diff --git a/Completion/Builtins/_zstyle b/Completion/Builtins/_zstyle index 07bfd2976..2e95545c2 100644 --- a/Completion/Builtins/_zstyle +++ b/Completion/Builtins/_zstyle @@ -18,6 +18,7 @@ styles=( cursor c:bool disable-stat c:bool expand c: + file-patterns c: format c: glob c: group-name c: @@ -49,6 +50,7 @@ styles=( sort c:bool tag-order c:tag special-dirs c:sdirs + squeeze-slashes c:bool stop c:stop substitute c: users c:_users diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index e76a54882..9c1be30bf 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -157,6 +157,14 @@ if zstyle -s ":completion${curcontext}:files" sort tmp1; then fi fi +# Squeeze sequences of slashes +if zstyle -t ":completion${curcontext}:paths" squeeze-slashes +then + PREFIX="${PREFIX//(\\/)#//}" + SUFFIX="${SUFFIX//(\\/)#//}" + [[ $PREFIX = */ ]] && SUFFIX=${SUFFIX#/} +fi + # We get the prefix and the suffix from the line and save the whole # original string. Then we see if we will do menucompletion. -- cgit 1.4.1