aboutsummaryrefslogtreecommitdiff
path: root/misc/zsh/completion.zsh
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2022-02-04 22:43:16 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2022-02-04 22:43:16 +0100
commit9d840758a8d195e52e8b7d08cd9c15f6b8259724 (patch)
treefe65235d0dc6251bb25ef7a116ae86fdcdd8a0ab /misc/zsh/completion.zsh
parent59b6afec0709fe961453cea35aa9ff6a4148099b (diff)
completions: pipe stderr to /dev/null
This fixes weird issues where e.g. nix build -L .#<tab> deletes the current line from the prompt.
Diffstat (limited to 'misc/zsh/completion.zsh')
-rw-r--r--misc/zsh/completion.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/zsh/completion.zsh b/misc/zsh/completion.zsh
index a902e37dc..e702c721e 100644
--- a/misc/zsh/completion.zsh
+++ b/misc/zsh/completion.zsh
@@ -4,7 +4,7 @@ function _nix() {
local ifs_bk="$IFS"
local input=("${(Q)words[@]}")
IFS=$'\n'
- local res=($(NIX_GET_COMPLETIONS=$((CURRENT - 1)) "$input[@]"))
+ local res=($(NIX_GET_COMPLETIONS=$((CURRENT - 1)) "$input[@]" 2>/dev/null))
IFS="$ifs_bk"
local tpe="${${res[1]}%%> *}"
local -a suggestions