_list: Add in an extra filter to remove empty lines.

The rewrite of ls functionality may have allowed blank but numbered
lines to creep into the ls display.  Search for such lines and
exclude them.

Signed-off-by: Emil Sit <sit@emilsit.net>

Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
This commit is contained in:
Emil Sit
2009-03-20 11:32:29 +08:00
committed by Gina Trapani
parent 52604ebf78
commit cc3e5f73aa

View File

@@ -407,6 +407,7 @@ _list() {
command=$( command=$(
sed = "$src" \ sed = "$src" \
| sed "N; s/^/ /; s/ *\(.\{$PADDING,\}\)\n/\1 /" \ | sed "N; s/^/ /; s/ *\(.\{$PADDING,\}\)\n/\1 /" \
| grep -v "^[0-9]\+ *$" \
| eval ${filter_command:-cat} \ | eval ${filter_command:-cat} \
| sed ''' | sed '''
s/^ /00000/; s/^ /00000/;