From ed1c47482d3bb9f6d8f61148e48540f0f0a9d1e0 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 2 Apr 2015 19:17:55 +0100 Subject: [PATCH] Fix interfacing.asciidoc wrong redirections --- doc/interfacing.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/interfacing.asciidoc b/doc/interfacing.asciidoc index 328357f9..aa2c1c86 100644 --- a/doc/interfacing.asciidoc +++ b/doc/interfacing.asciidoc @@ -29,7 +29,7 @@ For example, we can echo a message in Kakoune in 10 seconds with: sleep 10 echo "eval -client '$kak_client' 'echo sleep ended'" | kak -p ${kak_session} -) >& /dev/null < /dev/null & } +) > /dev/null 2>&1 < /dev/null & } ---- * The +nop+ command is used so that any eventual output from the @@ -59,7 +59,7 @@ The common pattern to do that is to use a fifo buffer: output=$(mktemp -d -t kak-temp-XXXXXXXX)/fifo mkfifo ${output} # run command detached from the shell - ( run command here >& ${output} ) >& /dev/null < /dev/null & + ( run command here > ${output} ) > /dev/null 2>&1 < /dev/null & # Open the file in Kakoune and add a hook to remove the fifo echo "edit! -fifo %{output} *buffer-name* hook buffer BufClose .* %{ nop %sh{ rm -r $(dirname ${output}} }" @@ -119,5 +119,5 @@ nop %sh{ ( # launch a detached shell # write to Kakoune socket for the buffer that triggered the completion echo "set buffer=${kak_bufname} completions '$completions'" | kak -p ${kak_session} -) >& /dev/null < /dev/null & } +) > /dev/null 2>&1 < /dev/null & } -----