Closed Gee19 closed 2 years ago
@Gee19 will take a look, let me know if / when this is complete.
@dhruvasagar Current approach seems okay but I wouldn't trust my vimscript skills. Open to suggestions and still need to test on nvim-0.4
I've tested and it works on latest nvim 0.7 and vim 8.2 with/without -q flag.
Tested and sessions still load automatically on 0.4.4 but argv()
seemingly returns an empty list even if I launch nvim with some flags..
I might be able to do something hacky like calling out to ps..
split(system("ps -o command= -p " . getpid()))
@Gee19 we're already checking argc
to see if any files were supplied in the argument list so we don't need to check argv()
again, this is not the same as v:argv
which is the command line arguments, also including argument list, however, the argument list will not include flags, v:argv
should.
Yes I definitely misunderstood the two when I wrote that. Unfortunately v:argv
doesn't exist for all neovim versions before 0.6.1 #87 and vim versions before 8.1.2233
but I suppose you can always suggest upgrading as an easy fix.
@Gee19 good point, i'll update to make sure this doesn't crash
I mistakenly switched this to argv() when I reverted my original change in #89
This seemingly breaks
git jump grep 'some_string'
again (#84), the whole purpose of my original PR in #85 😆Tested working on vim 8.2 and neovim 0.4.4/0.7