bup ls <dirs...>
--
s,hash show hash for each file
+a,all show hidden files
"""
-o = options.Options('bup ls', optspec)
+o = options.Options(optspec)
(opt, flags, extra) = o.parse(sys.argv[1:])
git.check_repo_or_die()
n = top.lresolve(d)
if stat.S_ISDIR(n.mode):
for sub in n:
- print_node(sub.name, sub)
+ if opt.all or not sub.name.startswith('.'):
+ print_node(sub.name, sub)
else:
- print_node(d, n)
+ if opt.all or not sub.name.startswith('.'):
+ print_node(d, n)
except vfs.NodeError, e:
log('error: %s\n' % e)
ret = 1