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

oli stat should show path as specified by users #2841

Closed
sarutak opened this issue Aug 10, 2023 · 0 comments · Fixed by #2842
Closed

oli stat should show path as specified by users #2841

sarutak opened this issue Aug 10, 2023 · 0 comments · Fixed by #2842

Comments

@sarutak
Copy link
Member

sarutak commented Aug 10, 2023

When we run oli stat for a path, the result show the path with the root omitted.

$ oli stat /path/to/file
path: path/to/file
size: 6307
type: file
last-modified: 2023-08-07 22:31:52.987908713 UTC

It's especially ugly when we run oli stat / because no component appears in the path: field.

$ oli stat /
path:
size: 264
type: dir
last-modified: 2023-08-08 15:56:44.372627670 UTC

On the other hand, Linux's stat show the File: field as specified by user.

$ stat /path/to/file
  File: /path/to/file
  Size: 6307      	Blocks: 16         IO Block: 4096   regular file
Device: 10304h/66308d	Inode: 1328196138  Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/     kou)   Gid: ( 1000/     kou)
Access: 2023-08-10 04:48:01.320407752 +0900
Modify: 2023-08-08 07:31:52.987908713 +0900
Change: 2023-08-08 07:31:52.987908713 +0900
 Birth: -
$ stat ./myfile
  File: ./myfile
  Size: 6307      	Blocks: 16         IO Block: 4096   regular file
Device: 10304h/66308d	Inode: 1328196138  Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/     kou)   Gid: ( 1000/     kou)
Access: 2023-08-10 04:48:01.320407752 +0900
Modify: 2023-08-08 07:31:52.987908713 +0900
Change: 2023-08-08 07:31:52.987908713 +0900
 Birth: -

I think it's nice to follow the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant