Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: incorrect display of eza -T --absolute /full/path #995

Open
j-xella opened this issue May 16, 2024 · 2 comments
Open

bug: incorrect display of eza -T --absolute /full/path #995

j-xella opened this issue May 16, 2024 · 2 comments
Labels
errors Something isn't working

Comments

@j-xella
Copy link

j-xella commented May 16, 2024

Version: v0.18.15 [+git]

~/tmp/20240516 22:05:52$ mkdir -p a/b/c/d

# this output is OK
~/tmp/20240516 22:06:00$ eza -TD --absolute a
/users/xxx/tmp/20240516/a
└── /users/xxx/tmp/20240516/a/b
   └── /users/xxx/tmp/20240516/a/b/c
      └── /users/xxx/tmp/20240516/a/b/c/d

# this one is NOT - path repeated twice in the root dir
~/tmp/20240516 22:06:21$ eza -TD --absolute $PWD/a
/users/xxx/tmp/20240516//users/xxx/tmp/20240516/a
└── /users/xxx/tmp/20240516/a/b
   └── /users/xxx/tmp/20240516/a/b/c
      └── /users/xxx/tmp/20240516/a/b/c/d
@j-xella j-xella added the errors Something isn't working label May 16, 2024
@cafkafk
Copy link
Member

cafkafk commented May 17, 2024

Could you expand on why this is incorrect?

@j-xella
Copy link
Author

j-xella commented May 20, 2024

It seems that when you call eza --absolute -T path/to/dir, eza outputs the root folder incorrectly. Subfolders and files there seem to be OK.

It seems that eza calculates the full path to the argument (path/to/dir), but only replaces the file name (dir) with it, leaving the path (path/to) intact. As a result, you end up with root folder having double path. In this example:

eza --absolute -T path/to/dir

The root folder is shown as

**path/to**/full/path/to/dir instead of just /full/path/to/dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants