[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm f23f49dbb0 3/3: Fix helm-locate-command default (#262
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/helm f23f49dbb0 3/3: Fix helm-locate-command default (#2625) |
|
Date: |
Sun, 5 Nov 2023 03:59:51 -0500 (EST) |
branch: elpa/helm
commit f23f49dbb096bff6a232aa750af8a7eae82f98bd
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix helm-locate-command default (#2625)
Not sure when such quoting in locate command line happened nor when -N
option came in, so this may break on systems with older locate cmd.
---
helm-locate.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/helm-locate.el b/helm-locate.el
index 11c66c7d3c..2e811753d1 100644
--- a/helm-locate.el
+++ b/helm-locate.el
@@ -56,7 +56,7 @@ unless `helm-locate-command' is non-nil.
Here are the default values it will use according to your system:
-Gnu/linux: \"locate %s -e -A --regex %s\"
+Gnu/linux: \"locate %s -e -A -N --regex %s\"
berkeley-unix: \"locate %s %s\"
windows-nt: \"es %s %s\"
Others: \"locate %s %s\"
@@ -69,6 +69,10 @@ for this.
The last option must be the one preceding pattern i.e \"-r\" or
\"--regex\".
+The option \"-N\" may not be available on old locate versions, it is needed on
+latest systems as locate send quoted filenames, it is BTW enabled by default,
if
+this option is not recognized on your system, remove it.
+
You will be able to pass other options such as \"-b\" or \"l\"
during Helm invocation after entering pattern only when multi
matching, not when fuzzy matching.
@@ -211,7 +215,8 @@ See `helm-locate-with-db' and `helm-locate'."
(unless helm-locate-command
(setq helm-locate-command
(cl-case system-type
- (gnu/linux "locate %s -e -A --regex %s")
+ ;; Use -N option by default (bug#2625)
+ (gnu/linux "locate %s -e -A -N --regex %s")
(berkeley-unix "locate %s %s")
(windows-nt "es %s %s")
(t "locate %s %s")))))