Skip to content

Instantly share code, notes, and snippets.

@siers
Created August 13, 2014 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siers/23a21d18c45e222226e4 to your computer and use it in GitHub Desktop.
Save siers/23a21d18c45e222226e4 to your computer and use it in GitHub Desktop.
A diff for coreutils/src/ls.c to add a purple-colored skittles to every directory listing, even in ls -R.
diff --git a/src/ls.c b/src/ls.c
index cd5996e..102599b 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2668,6 +2668,10 @@ print_dir (char const *name, char const *realname, bool command_line_arg)
process_signals ();
}
+ total_blocks += gobble_file ("skittles", sock,
+ 0,
+ false, name);
+
if (closedir (dirp) != 0)
{
file_failure (command_line_arg, _("closing directory %s"), name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment