cafehaine / xontrib-xlsd

xontrib-xlsd is the next gen ls command for xonsh shell, inspired by lsd.
GNU General Public License v3.0
21 stars 4 forks source link

targeting a file throws NotADirectoryErrorr #35

Closed tr0yspradling closed 11 months ago

tr0yspradling commented 1 year ago
@ ls -la ~/foo

Traceback (most recent call last):
  File "/home/me/.local/lib/python3.9/site-packages/xonsh/procs/proxies.py", line 522, in run
    r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec, spec.stack)
  File "/home/me/.local/lib/python3.9/site-packages/xonsh/procs/proxies.py", line 318, in proxy_five
    return f(args, stdin, stdout, stderr, spec)
  File "/usr/local/lib/python3.9/site-packages/xontrib/xlsd.xsh", line 643, in _ls
    _long_list(path, arguments.all)
  File "/usr/local/lib/python3.9/site-packages/xontrib/xlsd.xsh", line 582, in _long_list
    direntries = _get_entries(path, show_hidden)
  File "/usr/local/lib/python3.9/site-packages/xontrib/xlsd.xsh", line 362, in _get_entries
    with os.scandir(path) as iterator:
NotADirectoryError: [Errno 20] Not a directory: '/home/me/foo'
Return 1

Not sure if this is a issue or not. I wasn't able to find any references anywhere, so please let me know if this is a config issue on my end, or if I need to help debug further.

cafehaine commented 1 year ago

It's a bug in xlsd's code.

Unfortunately I don't really have the time to work on xlsd at the moment, so I won't be able to fix this at the moment.

tr0yspradling commented 1 year ago

Sorry it took so long, I meant to get a PR in sooner.