summaryrefslogtreecommitdiffstats
path: root/man/man1/fzf.1
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2023-11-04 16:06:59 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2023-11-04 16:19:16 +0900
commit3f78d76da1f114d4e0e50f8ed3ed19fda980342d (patch)
tree51e449291e2edf79f351a71220e734ce77224221 /man/man1/fzf.1
parent70c19ccf16a0f8ef2d0ef8ef44f69dd72aa210b1 (diff)
Allow accepting remote connections
Close #3498 # FZF_API_KEY is required for a non-localhost listen address FZF_API_KEY=xxx fzf --listen 0.0.0.0:6266
Diffstat (limited to 'man/man1/fzf.1')
-rw-r--r--man/man1/fzf.122
1 files changed, 13 insertions, 9 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1
index 309be90e..66bc678b 100644
--- a/man/man1/fzf.1
+++ b/man/man1/fzf.1
@@ -793,14 +793,14 @@ ncurses finder only after the input stream is complete.
e.g. \fBfzf --multi | fzf --sync\fR
.RE
.TP
-.B "--listen[=HTTP_PORT]"
-Start HTTP server on the given port. It allows external processes to send
-actions to perform via POST method. If the port number is omitted or given as
-0, fzf will choose the port automatically and export it as \fBFZF_PORT\fR
-environment variable to the child processes started via \fBexecute\fR and
-\fBexecute-silent\fR actions. If \fBFZF_API_KEY\fR environment variable is
-set, the server would require sending an API key with the same value in the
-\fBx-api-key\fR HTTP header.
+.B "--listen[=[ADDR:]PORT]"
+Start HTTP server and listen on the given address. It allows external processes
+to send actions to perform via POST method. If the port number is omitted or
+given as 0, fzf will automatically choose a port and export it as
+\fBFZF_PORT\fR environment variable to the child processes. If
+\fBFZF_API_KEY\fR environment variable is set, the server would require sending
+an API key with the same value in the \fBx-api-key\fR HTTP header.
+\fBFZF_API_KEY\fR is required for a non-localhost listen address.
e.g.
\fB# Start HTTP server on port 6266
@@ -812,8 +812,12 @@ e.g.
# Send action to the server
curl -XPOST localhost:6266 -d 'reload(seq 100)+change-prompt(hundred> )'
- # Start HTTP server on port 6266 and send an authenticated action
+ # Start HTTP server on port 6266 with remote connections allowed
+ # * Listening on non-localhost address requires using an API key
export FZF_API_KEY="$(head -c 32 /dev/urandom | base64)"
+ fzf --listen 0.0.0.0:6266
+
+ # Send an authenticated action
curl -XPOST localhost:6266 -H "x-api-key: $FZF_API_KEY" -d 'change-query(yo)'
# Choose port automatically and export it as $FZF_PORT to the child process