Why has the --group-directories-first switch for the ls command never evolved to have a short form as well?

Peter J. Mello

This has long puzzled me and this seemed like the best venue to solicit the perspective of those with far more POSIX time-in-grade than I have. I consider the parsing of ls output in this manner to be crucial and creating aliases to modify the ls command to default to it is always one of the first customizations I make to a new terminal profile.

Is this just an nasty side-effect of too many formative years spent using the Windows Explorer? Is there a mindset for interpreting the default mixed output that I've never heard explained, and once I do will have an epiphany with instant comprehension of why only cretins want directories and files separated? I know this is trivial but ls is such a touchstone for all command line activities that I feel as though I've missed something profound.

Thank you in advance for your teleological tutelage.

Stephen Kitt

This was discussed when the option was added to ls; Jim Meyering said

Just one little question about this patch: are you sure not to add a short option for --group-directories-first ?

For now, yes. It would take a strong argument to go against the “no new short option names” policy for ls, especially considering the alternative mentioned below.

--group-directories-first is already in my ls aliases ;) but in this month I had to use other linuxes where those aliases were not defined, and I realized that typing --group-directories-first for such a useful feature is IMHO really annoying...

Did you know that you can abbreviate that option with --g, since there is no other long option name starting with g?

So basically, ls already has so many short options (which is itself a running joke in Unix circles) that it takes a really strong argument to add one, and --group-directories-first has a nice pseudo-short alternative.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ls -l --group-directories-first (act on symlinks as well)

From Dev

How to sort results from ls command by modification date (directories first)?

From Dev

Enumerate files and directories with command 'ls'

From Dev

Why don't I have permission to ls directories I own and have r/w permissions for?

From Dev

How can I list directories first in the terminal with zsh / ls command in Mac OSX?

From Dev

Write a command to switch to specific directories

From Dev

ls --group-directories-last ? (List directories AFTER files)

From Dev

The command 'ls -d' is not displaying directories. Is there a way to get 'ls' to only display directories instead of files and directories?

From Dev

How can I use the ls command to find out a folder's owner and group, and what rights they each have?

From Dev

Is there a way to have ls show hidden files for only certain directories?

From Dev

How to sort first directories then files etc… when using “ls” in Unix

From Dev

Can `ls` be set to only list the first X files/directories?

From Dev

Is there any option with 'ls' command that I see only the directories?

From Dev

shell script to call ls command every time i change directories

From Dev

Is there any option with 'ls' command that I see only the directories?

From Dev

ls command: what does the first line mean?

From Dev

Why won't ls display output in multiple columns, for some directories?

From Dev

Why doesn't ls show the group name?

From Dev

Why are there short and long alternatives for command line options?

From Dev

Why my code never get the command reboot?

From Dev

Why does the ls command show deleted files?

From Dev

Why doesn't the command "ls | file" work?

From Dev

Why are the file sizes appearing differently with the ls command?

From Dev

Why does this "find" command scan all directories?

From Dev

Why does 'tree' command ignore directories but not files

From Dev

Why does my rsync command not recurse into directories?

From Dev

command line switch for sub-directories (dos vs bash) and wildcards

From Dev

How array name has its address as well as its first element in it?

From Dev

How array name has its address as well as its first element in it?

Related Related

  1. 1

    ls -l --group-directories-first (act on symlinks as well)

  2. 2

    How to sort results from ls command by modification date (directories first)?

  3. 3

    Enumerate files and directories with command 'ls'

  4. 4

    Why don't I have permission to ls directories I own and have r/w permissions for?

  5. 5

    How can I list directories first in the terminal with zsh / ls command in Mac OSX?

  6. 6

    Write a command to switch to specific directories

  7. 7

    ls --group-directories-last ? (List directories AFTER files)

  8. 8

    The command 'ls -d' is not displaying directories. Is there a way to get 'ls' to only display directories instead of files and directories?

  9. 9

    How can I use the ls command to find out a folder's owner and group, and what rights they each have?

  10. 10

    Is there a way to have ls show hidden files for only certain directories?

  11. 11

    How to sort first directories then files etc… when using “ls” in Unix

  12. 12

    Can `ls` be set to only list the first X files/directories?

  13. 13

    Is there any option with 'ls' command that I see only the directories?

  14. 14

    shell script to call ls command every time i change directories

  15. 15

    Is there any option with 'ls' command that I see only the directories?

  16. 16

    ls command: what does the first line mean?

  17. 17

    Why won't ls display output in multiple columns, for some directories?

  18. 18

    Why doesn't ls show the group name?

  19. 19

    Why are there short and long alternatives for command line options?

  20. 20

    Why my code never get the command reboot?

  21. 21

    Why does the ls command show deleted files?

  22. 22

    Why doesn't the command "ls | file" work?

  23. 23

    Why are the file sizes appearing differently with the ls command?

  24. 24

    Why does this "find" command scan all directories?

  25. 25

    Why does 'tree' command ignore directories but not files

  26. 26

    Why does my rsync command not recurse into directories?

  27. 27

    command line switch for sub-directories (dos vs bash) and wildcards

  28. 28

    How array name has its address as well as its first element in it?

  29. 29

    How array name has its address as well as its first element in it?

HotTag

Archive