zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Don't complete dirs as suffix aliases
@ 2022-05-11  7:37 Marlon Richert
  2022-05-11  8:03 ` Mikael Magnusson
  2022-05-12  5:44 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Marlon Richert @ 2022-05-11  7:37 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 55 bytes --]

...because suffix aliases don't work with directories.

[-- Attachment #2: 0001-Don-t-complete-dirs-as-suffix-aliases.txt --]
[-- Type: text/plain, Size: 1051 bytes --]

From 7c66e4983fa7149e1912d0390f4303351ad001a3 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlonrichert@users.noreply.github.com>
Date: Wed, 11 May 2022 10:18:16 +0300
Subject: [PATCH] Don't complete dirs as suffix aliases

---
 .vscode/settings.json                   | 3 +++
 Completion/Zsh/Type/_suffix_alias_files | 1 +
 2 files changed, 4 insertions(+)
 create mode 100644 .vscode/settings.json

diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 000000000..640a2c3e3
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+        "search.sortOrder": "fileNames"
+}
\ No newline at end of file
diff --git a/Completion/Zsh/Type/_suffix_alias_files b/Completion/Zsh/Type/_suffix_alias_files
index 1c2c8ebb5..de3e2b9d9 100644
--- a/Completion/Zsh/Type/_suffix_alias_files
+++ b/Completion/Zsh/Type/_suffix_alias_files
@@ -16,6 +16,7 @@ else
     tmpa=(${(kq)saliases})
     pat="*.(${(kj.|.)tmpa})"
 fi
+pat+='(#q^/)'
 
 # _wanted is called for us by _command_names
 _path_files "$@" -g $pat
-- 
2.36.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-30 11:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11  7:37 [PATCH] Don't complete dirs as suffix aliases Marlon Richert
2022-05-11  8:03 ` Mikael Magnusson
2022-05-11 10:44   ` Marlon Richert
2022-05-11 11:18     ` Peter Stephenson
2022-05-12  5:44 ` Bart Schaefer
2022-05-30 11:51   ` Marlon Richert

Code repositories for project(s) associated with this 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).