Closed dreamerlzl closed 7 months ago
and if you directly type rg under test
, you can clearly see there is a permission denied error while the matches for other accessiable files are still working
Can not reproduce. I can always get
Messages maintainer: The Vim Project
File "/home/yggdroot/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/cli.py", line 698, in input^@ callback()^@ File "/home/yggdroot/.vim/plugged/LeaderF/autoload/leaderf/python/le
aderf/manager.py", line 70, in deco^@ func(self, *args, **kwargs)^@ File "/home/yggdroot/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/manager.py", line 2852, in _workInIdle^@
raise self._read_content_exception[1]^@ File "/home/yggdroot/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/manager.py", line 2825, in _readContent^@ for line in content:^@ File
"/home/yggdroot/.vim/plugged/LeaderF/autoload/leaderf/python/leaderf/asyncExecutor.py", line 209, in __next__^@ return next(self._g)^@ File "/home/yggdroot/.vim/plugged/LeaderF/autoloa
d/leaderf/python/leaderf/asyncExecutor.py", line 106, in read^@ raise Exception(lfBytes2Str(err) + lfBytes2Str(err, encoding))^@Exception: test.txt: Permission denied (os error 13)^@test
.txt: Permission denied (os error 13)
ok, sorry for the bothering. It seems that this error is a kind: echo
message defined by :h ui-messages
and is filtered out by my noice plugin.
Still, can we show other matches despite the permission denied error?
Because if you execute the rg
in terminal outside neovim, it will still show other accessible matches.
Add --no-messages
.
vim --version
ornvim --version
: NVIM v0.9.4:echo has("python")
::echo has("python3")
::echo &pythondll
(only vim, not neovim)::echo &pythonthreedll
(only vim, not neovim)::py print(sys.version)
::py3 print(sys.version)
::echo g:Lf_Debug_Cmd
::echo g:Lf_FilesFromCache
:Describe your question, feature request, or bug.
Currently, it seems that once there's a file/directory the current user has no access to,
Leaderf! rg
will fail to find any matches in other files which are actually accessible.Steps to reproduce
test
, create a file/dir that the current user can not read (say,drwx------
and owned by root)echo hello > a.txt
undertest
test
and try to useLeaderf! rg
, no matter what input you give, no results or errors would be shown.Actual behaviour
No output at all, users don't know what have happened.
Expected behaviour
Any error message or help info so that users can know there is a permission issue.