Skip to content

dir and vdir are missing #3163

Closed
Closed

Description

@tertsdiepraam

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.

Activity

  1. tertsdiepraam commented on Feb 19, 2022

    @tertsdiepraam
    CollaboratorAuthor

    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.

  2. gmnsii commented on Apr 14, 2022

    @gmnsii
    Contributor

    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 ?

  3. tertsdiepraam commented on Apr 14, 2022

    @tertsdiepraam
    CollaboratorAuthor

    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.

  4. gmnsii commented on Apr 14, 2022

    @gmnsii
    Contributor

    Ok thanks.

  5. added a commit that references this issue on Apr 15, 2022
  6. sylvestre commented on Apr 15, 2022

    @sylvestre
    SponsorContributor

    I think we are good now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions