From: Takeshi Banse <thb@laafc.net>
To: zsh-users@zsh.org
Subject: Re: change in zstyle file-patterns handling between 5.5.1 & 5.6(.2)?
Date: Mon, 17 Sep 2018 11:27:15 +0900 [thread overview]
Message-ID: <20180917022715.GA17398@laafc.net> (raw)
In-Reply-To: <25E31A55-5918-42B8-83B4-DDC58A2D52EA@bitraven.io>
Hi,
I've also found a near related problem in zstyle list-dirs-first; that is,
zsh ignores list-dirs-first style.
Step to reproduce:
~/.zshrc-minimal:
----
autoload -Uz compinit && compinit
zstyle ':completion:*:*:*:*:*' group-name ''
zstyle ':completion:*' list-dirs-first yes
zstyle ':completion:*:descriptions' format '%B%F{black}%d%f%b'
----
Here is a shell session:
----
% zsh -f
host% . ~/.zsh-minimal
host% mkdir -p /tmp/test-dir/9dir{1,2}
host% touch /tmp/test-dir/0file
host% cat /tmp/test-dir/<TAB>
files
0file 9dir1/ 9dir2/
----
I would expect the following:
----
host% cat /tmp/test-dir/<TAB>
directory
9dir1/ 9dir2/
files
0file
----
* ml.zsh-workers.454@bitraven.io <ml.zsh-workers.454@bitraven.io> [2018-09-16 20:50]:
> Is this an intentional change?
> How can I get the separation back in 5.6 (ideally in a way that also works
> in 5.5)?
If I revert the commit 6b4e78dce6a505d8dab5554d9925e38e13bb40ea like
a workaround diff hunk at the end of this mail, it works here for these
2 particular issues.
The diff at the end of this mail breaks the patch:
"[PATCH] Completion: Small fixes for _files, _object_files"
http://www.zsh.org/mla/workers/2018/msg00788.html
So, my workaround diff is not good shape... I'm wondering if someone
could help.
Here is my trial diff:
diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 5df22ea46..2b0c5580a 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -121,7 +121,7 @@ for def in "$pats[@]"; do
done
fi
else
- _path_files -g "$pat" "$opts[@]" "$expl[@]" && ret=0
+ _path_files "$expl[@]" -g "$pat" "$opts[@]" && ret=0
fi
done
(( ret )) || break
next prev parent reply other threads:[~2018-09-17 2:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 11:50 ml.zsh-workers.454
2018-09-17 2:27 ` Takeshi Banse [this message]
2018-09-17 5:58 ` dana
2018-09-17 13:01 ` Daniel Shahaf
2018-09-17 21:09 ` dana
2018-09-25 0:13 ` dana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180917022715.GA17398@laafc.net \
--to=thb@laafc.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).