Comments (7)
isn't fzf waiting for something to input to it so that it can output something?
You can try piping something into the job if you want perhaps. Or connect one job to another. I think I had an idea about do unix style "piping" between jobs. I can investigate that.
from plenary.nvim.
fixed w/ new writer
parameter
from plenary.nvim.
I think there was a misunderstanding here, can we re-open this?
The example command was run with the --filter
option, which is meant for scripting and does not start an interactive process. WIth that option, it behaves more like fd
but using the fuzzy algorithm. If you run it in a terminal, it outputs newline separated relative file paths for the matches and exits.
@smolck did you find a solution to this issue?
from plenary.nvim.
no it cant be reopened. the example was missing the pipe and that features was added with the writer interface
local Job = require("plenary.job")
Job:new({
command = "fzf",
args = {"--no-sort", "--filter", "thing"},
on_stdout = function(_, data, _)
print(data)
end,
on_exit = function(_, code, _)
print("exit", code)
end,
writer = Job:new{
command = "fd",
},
}):start()
from plenary.nvim.
Thanks for the quick response @Conni2461 . I don't get it though, why would you pipe the fd
command into fzf
? The fzf --filter thing
command is the complete command I am trying to run, and it exits immediately without input when run from a terminal. I don't need to add the fd
command.
I'm trying to investigate, it seems like fzf is doing something with stdout/stderr that is unexpected. It works fine at the command line but never calls those methods when run in the job.
EDIT: Also, the above example produces errors when I try to run it:
Error executing vim.schedule lua callback: .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:217: bad argument #1 to 'is_active' (Expected uv_hand
le userdata)
stack traceback:
[C]: in function 'is_active'
.../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:217: in function 'shutdown'
.../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:343: in function <.../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:342>
Error executing luv callback:
cannot resume dead coroutine
stack traceback:
[builtin#36]: at 0x58f462326ad0
from plenary.nvim.
@cseickel, were you able to use this solve this with the writer
option?
from plenary.nvim.
@Conni2461, is there a way to do something like:
writer = Job:new{
command = "stdin", -- for an interactive experience.. like a prompt-buffer?
},
from plenary.nvim.
Related Issues (20)
- job:pid() returns function? HOT 1
- [Feat] `selene` linter support
- Unintentionally global variables stat and ret in async_lib?
- test_harness does not handle when exceptions are thrown in a spec HOT 1
- vim.tbl_islist deprecation HOT 1
- Plenary Callback issue in dependent plugin HOT 8
- too many curl processes spawned by plenary HOT 2
- Plenary's global `busted` definitions get picked up by LuaLS
- Attach debugger to test harness
- Build Failed HOT 2
- Build Failed HOT 1
- Plenary needs lua version 5.1 but disabled on homebrew HOT 8
- New release?
- Build failed? HOT 10
- [Feature] Improve `Path:normalize` to return shorter relative path using ../
- Curl module may accidentally reuse URL
- Plenary/Hererocks fails to compile HOT 1
- [Question] what is the point of checking executable right in scandir?
- Feature request: Expose status code to stream in curl
- curl parameters size limit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plenary.nvim.