diepm / vim-rest-console

A REST console for Vim.
658 stars 54 forks source link

Add piping output to some command line #93

Open emaniacs opened 4 years ago

emaniacs commented 4 years ago

This pr will enable piping the output into some command line. if a line start with pipe(|) thats means all of output of curl command will be pipe into that line e.g

http://localhost:8000
--silent

# this is global pipe command, https://stedolan.github.io/jq/
| jq .

--

--

# using global pipe commands

GET /v1/users

--

# using custom pip command

| jq '.name'

GET  /v1/users/1

--

# using custom pipe command
# sometimes the apps error and didnt give a proper json so jq will fail
# while parse the output, so we need to pipe it to file first

| tee /tmp/fail.log | jq '.name'

GET  /v1/users/1
fedreg-bn commented 2 years ago

Any plans to merge this pr ☝️ ? Would be really useful

ajukraine commented 2 years ago

Switching to your branch, as it seems there are even no more fresh changes to plugin to merge :)