summaryrefslogtreecommitdiff
path: root/helm-find.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2019-04-24 16:43:53 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2019-04-24 16:43:53 +0200
commit869d68b5965740a3f6926621ab4facda82fe4d10 (patch)
tree8a74a2fda7775ccefa5e78b12b179476b95c1909 /helm-find.el
parent1424ee4c18c3c12a25466b7b22812e3919f7b6e3 (diff)
Redirect errors in /dev/null (#2121)
when helm-find-noerrors is non nil. * helm-find.el (helm-find-noerrors): New. (helm-find-shell-command-fn): Use it.
Diffstat (limited to 'helm-find.el')
-rw-r--r--helm-find.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/helm-find.el b/helm-find.el
index 45ef00bf..15d2b85f 100644
--- a/helm-find.el
+++ b/helm-find.el
@@ -31,6 +31,11 @@ I.e use the -path/ipath arguments of find instead of -name/iname."
:group 'helm-files
:type 'boolean)
+(defcustom helm-find-noerrors nil
+ "Prevent showing error messages in helm buffer when non nil."
+ :group 'helm-files
+ :type 'boolean)
+
(defvar helm-find-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map helm-generic-files-map)
@@ -107,7 +112,8 @@ Additional find options can be specified after a \"*\"
separator."
(let* (process-connection-type
non-essential
- (cmd (helm-find--build-cmd-line))
+ (cmd (concat (helm-find--build-cmd-line)
+ (if helm-find-noerrors "2> /dev/null" "")))
(proc (start-file-process-shell-command "hfind" helm-buffer cmd)))
(helm-log "Find command:\n%s" cmd)
(prog1 proc