m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 17:13:42 -05:00

Add GET endpoints for getting the state of the finder

* GET / (or GET /current)
* GET /query
This commit is contained in:
Junegunn Choi
2022-12-25 16:27:02 +09:00
parent de0da86bd7
commit 750b2a6313
6 changed files with 66 additions and 22 deletions

View File

@@ -3,13 +3,21 @@ CHANGELOG
0.36.0
------
- Added `--listen=HTTP_PORT` option to receive actions from external processes
- Added `--listen=HTTP_PORT` option to start HTTP server. It allows external
processes to send actions to perform via POST method, or retrieve the
current state of the finder.
```sh
# Start HTTP server on port 6266
fzf --listen 6266
# Send actions to the server
curl -XPOST localhost:6266 -d 'reload(seq 100)+change-prompt(hundred> )'
# 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
```
- Added `next-selected` and `prev-selected` actions to move between selected
items