Thank you so much for this incredible project
I'm having some trouble with asynchandler#rename, but it may be user error
For example, the command I'm trying to run is just RSpec on the directory of the file the cursor is currently in. I get that directory with %:h (which I found using :help filename-modifiers)
I want RSpec to save an html file, and if there are any errors RSpec spits back to the console, I want AsyncCommand to save those in a 2nd file for me
Here's what I tried:
command! MyRspecFunction call MyRspecFunction()
function! MyRspecFunction()
let cmd = 'rspec %:h\*_spec.rb --format html --out %:h\most_recent_rspec.html'
let env = asynchandler#rename('%:h\ErrorMessage.txt')
call asynccommand#run(cmd, env)
endfunction
What works:
The file "most_recent_rspec.html" does get saved in the expected directory, right alongside the specs! Very cool. So the cmd part is working
What doesn't seem to work:
The file "ErrorMessage.txt" is never created, no matter what
I can, of course, manually see what RSpec would have spit back to the console by typing this into vim:
:AsyncShell 'rspec %:h\*_spec.rb --format html --out %:h\most_recent_rspec.html'
but, I do need that ErrorMessage.txt file and unless I misunderstood, I thought that's what #rename was for. Sorry if I'm misusing it somehow! :|