Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Don't complete dirs as suffix aliases



...because suffix aliases don't work with directories.
From 7c66e4983fa7149e1912d0390f4303351ad001a3 Mon Sep 17 00:00:00 2001
From: Marlon Richert <marlonrichert@xxxxxxxxxxxxxxxxxxxxxxxx>
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



Messages sorted by: Reverse Date, Date, Thread, Author