It has not way to restore default ls sorting by name, if it was changed.
Attached patch adds "name" for long option --sort.

ls: add option --sort=name

add "name" to sort_args and sort_name to sort_types

Best regards,
Tzvetelin Katchov
--- a/src/ls.c
+++ b/src/ls.c
@@ -911,11 +911,13 @@ ARGMATCH_VERIFY (format_args, format_types);
 
 static char const *const sort_args[] =
 {
-  "none", "time", "size", "extension", "version", "width", nullptr
+  "none", "time", "size", "extension", "version", "width",
+  "name", nullptr
 };
 static enum sort_type const sort_types[] =
 {
-  sort_none, sort_time, sort_size, sort_extension, sort_version, sort_width
+  sort_none, sort_time, sort_size, sort_extension, sort_version, sort_width,
+  sort_name
 };
 ARGMATCH_VERIFY (sort_args, sort_types);
 

Reply via email to