diff --git a/jc/parsers/ls.py b/jc/parsers/ls.py index 40433cfa..c73bc552 100644 --- a/jc/parsers/ls.py +++ b/jc/parsers/ls.py @@ -259,6 +259,11 @@ def parse(data, raw=False, quiet=False): new_section = False continue + # fix for OSX - doesn't print 'total xx' line if empty directory + if new_section and entry == '': + new_section = False + continue + # fixup for filenames with newlines if not new_section \ and not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry):