--- a/toys/posix/ls.c	2016-02-26 13:23:36.000000000 +0530
+++ b/toys/posix/ls.c	2016-03-09 14:47:36.000000000 +0530
@@ -2,38 +2,38 @@
  *
  * Copyright 2012 Andre Renaud <andre@bluewatersys.com>
  * Copyright 2012 Rob Landley <rob@landley.net>
+ * Copyright 2015 Sameer Prakash Pradhan <sameer.p.pradhan@gmail.com>
  *
  * See http://opengroup.org/onlinepubs/9699919799/utilities/ls.html
 
-USE_LS(NEWTOY(ls, USE_LS_COLOR("(color):;")"ZgoACFHLRSacdfhiklmnpqrstux1[-Cxm1][-Cxml][-Cxmo][-Cxmg][-cu][-ftS][-HL]", TOYFLAG_BIN|TOYFLAG_LOCALE))
+USE_LS(NEWTOY(ls, USE_LS_COLOR("(color):;")"ZgoACFHLRSab(escape)cdfhiklmnpqrstux1[-Cxm1][-Cxml][-Cxmo][-Cxmg][-cu][-ftS][-HL]", TOYFLAG_BIN|TOYFLAG_LOCALE))
 
 config LS
   bool "ls"
   default y
   help
-    usage: ls [-ACFHLRSZacdfhiklmnpqrstux1] [directory...]
-
+    usage: ls [-ACFHLRSZabcdfhiklmnpqrstux1] [directory...]
     list files
 
     what to show:
-    -a	all files including .hidden		-c  use ctime for timestamps
-    -d	directory, not contents			-i  inode number
-    -k	block sizes in kilobytes		-p  put a '/' after dir names
-    -q	unprintable chars as '?'		-s  size (in blocks)
-    -u	use access time for timestamps		-A  list all files but . and ..
-    -H	follow command line symlinks		-L  follow symlinks
-    -R	recursively list files in subdirs	-F  append /dir *exe @sym |FIFO
-    -Z	security context
+    -a  all files including .hidden             -b  print C-style escapes for nongraphic characters (--escape)
+    -c  use ctime for timestamps                -d  directory, not contents
+    -i  inode number                            -k  block sizes in kilobytes
+    -p  put a '/' after dir names               -q  unprintable chars as '?'
+    -s  size (in blocks)                        -u  use access time for timestamps
+    -A  list all files but . and ..             -F  append /dir *exe @sym |FIFO
+    -H  follow command line symlinks            -L  follow symlinks
+    -R  recursively list files in subdirs       -Z  security context
 
     output formats:
-    -1	list one file per line			-C  columns (sorted vertically)
-    -g	like -l but no owner			-h  human readable sizes
-    -l	long (show full details)		-m  comma separated
-    -n	like -l but numeric uid/gid		-o  like -l but no group
-    -x	columns (horizontal sort)
+    -C  columns (sorted vertically)             -g  like -l but no owner
+    -h  human readable sizes                    -1  list one file per line
+    -l  long (show full details)                -m  comma separated
+    -n  like -l but numeric uid/gid             -o  like -l but no group
+    -x  columns (horizontal sort)
 
     sorting (default is alphabetical):
-    -f	unsorted	-r  reverse	-t  timestamp	-S  size
+    -f  unsorted   -r  reverse  -t  timestamp  -S  size
 
 config LS_COLOR
   bool "ls --color"
@@ -293,7 +293,7 @@
 
   if (-1 == dirfd) {
     strwidth(indir->name);
-    perror_msg_raw(indir->name);
+    perror_msg(indir->name);
 
     return;
   }
@@ -474,6 +474,11 @@
     if (flags & FLAG_q) {
       char *p;
       for (p=sort[next]->name; *p; p++) fputc(isprint(*p) ? *p : '?', stdout);
+    } else if (flags & FLAG_b){
+        char *b;
+
+        for (b = sort[next]->name; *b; b++)
+            if (isgraph(*b)) fputc(*b, stdout);
     } else xprintf("%s", sort[next]->name);
     if (color) xprintf("\033[0m");
 
