aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/ls.c
AgeCommit message (Collapse)Author
2015-03-01Patches from Elliott Hughes to fix various printf() format strings.Rob Landley
(Don't specify the space flag when it's the default behavior. The ifconfig stuff was actual bugs.)
2014-10-30Test for ls -d from Isaac Dunham, and he pointed out -F also disables ↵Rob Landley
symlink following.
2014-10-30Bug report from Isaac Dunham: ls -d shouldn't follow command line symlinks ↵Rob Landley
without -H or -L (just like ls -l).
2014-08-02Missed checking in dirtree_recurse() change (now needs specific ↵Rob Landley
DIRTREE_SYMFOLLOW value, not just true/false).
2014-07-20Don't go into an endless loop if we hit a bad utf8 sequence without -q.Rob Landley
2014-07-20Add utf8 support to ls -C.Rob Landley
Use wcwidth() instead of strlen(), and extend the -q substitution to also whiteout nonprintable characters that are nonparseable utf8 snippets.
2013-09-02Switch ls from utoa to sprintf.Rob Landley
2013-09-01Implement ls --color=auto, suggested by Rich Felker.Rob Landley
2013-08-01ls --color should depend on LS in menuconfig.Rob Landley
2013-07-01Make ls output major, minor for block devices.0.4.5Rob Landley
2013-06-30First pass at ls --colorRob Landley
2013-06-30Condense ls help text.Rob Landley
2013-06-30Fix another segfault in ls -C when terminal size is 0x0.Rob Landley
2013-06-02Stat cleanup.Rob Landley
lib: rename format_mode() to mode_to_string() (echoing string_to_mode), make it take a normal char * argument. stat: collapse big switch/case statements that only have one line each into if/else staircase (much fewer lines of code). Remove return type (other stat implementations print ? for unknown escapes, so do that here). Inline do_stat() and do_statfs(). Set default string in normal local variable "format". Remove unnecessary struct d. Restructure stat logic to "if (flagf && !statfs()) else if (!flagf && !stat()) else perror_msg();" Teach %N to add -> symlink. Judicious use of putchar() instead of xputc to let FILE * do its job collating output.
2013-04-22Add library function for the file permission formatting in ls and statFelix Janda
2012-12-26A screen width of 1 is possible (in some weird setups), and gives ls -C a ↵Rob Landley
division by zero error.
2012-12-06Have dirtree_add_node() set parent so error message can provide full path.Rob Landley
2012-12-01Minor whitespace tweak.Rob Landley
2012-11-26Squash "type punned pointer" nonsense with a bigger hammer. (Sheesh.)Rob Landley
2012-11-19Teach option parsing about [groups] of related options.Rob Landley
2012-11-15Make ls default to -C if no option specified and it's outputting to a tty.Rob Landley
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
2012-10-08New build infrastructure to generate FLAG_ macros and TT alias, #define ↵Rob Landley
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
2012-09-06I screwed up ls in commit 580. Oops. Fix it.Rob Landley
2012-08-25Regularize command headers, update links to standards documents.Rob Landley
2012-08-25Move commands into "posix", "lsb", and "other" menus/directories.Rob Landley