mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 00:53:42 -05:00
Revert "Add GET endpoints for getting the state of the finder"
This reverts commit 750b2a6313.
This can cause a deadlock if the endpoints are accessed in the core event
loop via execute action.
fzf --listen 6266 --bind 'space:execute:curl localhost:6266'
Technically, there's no reason to use the API because the information is
already available via `{}` and `{q}`, but I'd like to completely remove
the risk of misuse.
This commit is contained in:
@@ -723,21 +723,14 @@ e.g. \fBfzf --multi | fzf --sync\fR
|
||||
.TP
|
||||
.B "--listen=HTTP_PORT"
|
||||
Start HTTP server on the given port. It allows external processes to send
|
||||
actions to perform via POST method, or retrieve the current state of the
|
||||
finder.
|
||||
actions to perform via POST method.
|
||||
|
||||
e.g.
|
||||
\fB# Start HTTP server on port 6266
|
||||
fzf --listen 6266
|
||||
|
||||
# Send action to the server via POST method
|
||||
curl localhost:6266 -d 'reload(seq 100)+change-prompt(hundred> )'
|
||||
|
||||
# Retrieve the current item
|
||||
curl localhost:6266
|
||||
|
||||
# Retrieve the query string
|
||||
curl localhost:6266/query
|
||||
# Send action to the server
|
||||
curl -XPOST localhost:6266 -d 'reload(seq 100)+change-prompt(hundred> )'
|
||||
\fR
|
||||
|
||||
The port number is exported as \fB$FZF_LISTEN_PORT\fR on the child processes.
|
||||
|
||||
Reference in New Issue
Block a user