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

dir and vdir are missing #3163

Closed
Tracked by #3336
tertsdiepraam opened this issue Feb 19, 2022 · 5 comments
Closed
Tracked by #3336

dir and vdir are missing #3163

tertsdiepraam opened this issue Feb 19, 2022 · 5 comments
Labels

Comments

@tertsdiepraam
Copy link
Member

From the GNU docs:

dir is equivalent to ls -C -b; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences.

(source)

vdir is equivalent to ls -l -b; that is, by default files are listed in long format and special characters are represented by backslash escape sequences.

(source)

Instead of making entirely separate utilities, we should probably just make these shorthands for ls much like how hashsum and test are set up.

@tertsdiepraam
Copy link
Member Author

For this approach, the GNU decoded project might be helpful: https://www.maizure.org/projects/decoded-gnu-coreutils/ls.html.

It explains that GNU uses a mode variable that is set to either ls, dir or vdir, which changes the behaviour of the program.

@gmnsii
Copy link
Contributor

gmnsii commented Apr 14, 2022

Do the changes made by the dir or vdir invocations need to be overwritable ? For example dir is a shortcut for ls -C -b but can you overwrite -C using something like dir -l ?

@tertsdiepraam
Copy link
Member Author

I just did a quick test and I think the answer is yes. dir -l outputs the long format and vdir -C outputs the column format.

@gmnsii
Copy link
Contributor

gmnsii commented Apr 14, 2022

Ok thanks.

sylvestre pushed a commit that referenced this issue Apr 15, 2022
Fix issue #3163

They are basically ls with some different options.
@sylvestre
Copy link
Contributor

I think we are good now!

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

No branches or pull requests

3 participants