Closed VardanHeroic closed 2 weeks ago
Hi @VardanHeroic, thanks for your contribution. Just had a play around with it and looks good to me. Only thing I found is that with the current implementation is that ranger will open with the focus on the directory passed in and its current directory set to the parent of the directory passed in.
I think it would make more sense if we set the rangers current directory to the directory passed in instead of the parent. We can do this by adding in the flag --cmd="cd $DIR_PATH"
to the ranger command.
We also need to add a check if the directory exists or not, if it doesn't exist then we should fallback to the default behaviour.
If directory doesn't exist it just opens empty editor
LGTM! Thanks for your contribution!
Some times when I'm opening nvim I forgot to write full path of file and when I accidentally opened directory instead of file it just opened ranger in home directory and needed to exit nvim and write command again. So I decided to make it open the directory I wrote.